Excel makes it easy to decipher why a formula produces its result. When you click on a cell, the formula is displayed in the formula bar. If that's not enough, you can select the Formulas ribbon and click Evaluate Formulas for a step-by-step walkthrough.
But what happens when you don't want the formulas displayed? When you hide formulas in Excel, the formula bar displays blank (or only the calculated value) when someone selects a hidden-formula cell. This gives you full control over what recipients can see. There are several common reasons to hide formulas in Excel and only display the value:
This process works in Excel for Microsoft 365 and other recent desktop versions of Excel. Luckily, Excel makes it fairly simple to hide formulas. Just follow the steps below.
Before you begin, it helps to understand two cell-level properties that control what users can do with your spreadsheet. The Locked property prevents users from editing a cell's contents, while the Hidden property (sometimes called the Excel hidden property) prevents users from seeing the cell's formula in the formula bar. Both require sheet protection to be active before they take effect.
| Locked | Hidden | |
|---|---|---|
| What it does: | Prevents editing of cell contents | Prevents formula from appearing in the formula bar |
| Default state: | On (checked by default for all cells) | Off (unchecked by default for all cells) |
| When to use: | When you want to lock formulas in Excel so users cannot change them | When you want to hide formulas in Excel so users cannot see the underlying logic |
| Requires sheet protection: | Yes | Yes |
With that foundation in place, here is how to hide and protect your formulas in three phases.
1) On the Review ribbon, find the button labeled either Protect Sheet or Unprotect Sheet.
2) If the button is labeled Protect Sheet, no action is needed — the sheet is already unprotected.
3) If the button is labeled Unprotect Sheet, then click it. The sheet is now unprotected.
By default, when you click on a cell, its formula appears in the formula bar.
To hide formulas:
1) Select the cells for which you want to hide the formulas.
2) Right-click the cell (or cells) and choose Format Cells.
3) In the Format Cells dialog box, click the Protection tab.
4) Check the Hidden box.
5) Note: Hidden is what prevents the user from seeing the formula. Locked prevents the user from changing the contents of the cell. Locked is set by default.
6) Click OK.
Important Step: Setting the cell format to hidden has no effect until you protect the sheet!
That's it! The formulas in your worksheet are now protected, and your users cannot see or edit the formulas. To verify it, click on a formula:
The formula no longer appears in the formula bar.
If you need to unhide formulas in Excel and make them visible again, you can reverse the process in a few steps:
If you want to keep the sheet protected after making your changes, return to the Review tab and click Protect Sheet to reapply protection with a new or existing password.
Now that you know how to hide and unhide formulas, try some of the other options to customize the protection properties, such as unlocking only specific input cells. This allows you to send a spreadsheet out to multiple users with an input cell—B1 in this example, where the user would enter their producer code—yet prevent the user from accessing other cells. This is a convenient tool for distributing corporate results to company agents, employees or others while filtering the values so that each user can see only those for which they are authorized.
Hiding formulas is just one of many techniques that can make your spreadsheets more secure and professional. Pryor Learning offers live seminars and on-demand Excel courses that cover everything from foundational skills to advanced data analysis. With a PryorPlus membership, you get unlimited access to Excel training and hundreds of other professional development courses so you can keep building your skills at your own pace. For more hands-on walkthroughs, browse our full library of Excel tutorials and tips.