Excel Hide Formulas From Formula Bar?
In this article
Yes, you can hide formulas from the formula bar in Excel by locking the cells and then protecting the worksheet. This guide shows you the exact steps, explains how the protection works, and covers common pitfalls so your formulas stay hidden but your spreadsheet still functions.
Why Hide Formulas in Excel?
Sometimes you don't want other people to see the logic behind your calculations. Hiding formulas is useful when you're sharing a workbook with colleagues, clients, or students and want to keep your methods private. It also prevents accidental edits to complex formulas, because the formula bar won't show the underlying expression—only the result appears in the cell. The feature is part of Excel's built-in protection system, not a separate privacy tool.
Note that hiding formulas only works after you protect the sheet. If you simply lock a cell without protecting the sheet, the formula bar still shows the formula. Protection is the key step that activates the hidden setting.
How the Hidden Setting Works
Every cell in Excel has a Locked property and a Hidden property. By default, all cells are locked, and the Hidden property is off. When you turn on sheet protection, locked cells become uneditable, and cells with the Hidden property on will not display their formulas in the formula bar. The formula still exists in the cell and still calculates normally; it's just not visible.
This means you can selectively hide only certain formulas while leaving others visible. For example, you might hide the formulas in column C but keep the ones in column D visible. The Hidden property is per-cell, so you have full control.
Step-by-Step: Hide Formulas and Protect the Sheet
- Select the cell or range of cells containing the formulas you want to hide.
- Right-click the selection and choose Format Cells (or press Ctrl+1).
- Go to the Protection tab.
- Check the Hidden box. (The Locked box is usually already checked; leave it as is.)
- Click OK.
- Now protect the worksheet: go to the Review tab on the ribbon and click Protect Sheet.
- In the dialog box, you can set a password (optional) and choose what users can do. Make sure the option Select locked cells is checked if you want users to click on the cells but not see the formula.
- Click OK. If you set a password, you'll be asked to confirm it.
After these steps, when you click on a hidden formula cell, the formula bar will be empty. The cell still shows the calculated value, and the formula still updates if other cells change.
What Protection Allows and Blocks
When a sheet is protected, all locked cells are off-limits for editing. However, you can customize what users can do in the Protect Sheet dialog. Common options include:
- Select locked cells – lets users click on hidden formula cells (usually keep this on).
- Select unlocked cells – lets users click on cells that you've unlocked.
- Format cells – allows users to change formatting even on locked cells.
- Insert/delete rows or columns – if you want users to be able to add or remove rows.
If you uncheck Select locked cells, users won't even be able to click on the hidden formula cells, which might be too restrictive. In most cases, you want users to see the result but not the formula, so keep that option checked.
Common Mistakes and Pitfalls
- Forgetting to protect the sheet – Without protection, the Hidden property has no effect. This is the #1 mistake.
- Locking cells you want users to edit – If you want users to input data, you must unlock those input cells before protecting. Select the input cells, go to Format Cells > Protection, and uncheck Locked.
- Using a password you forget – If you lose the password, you cannot unprotect the sheet easily. Write it down or use a password manager.
- Hiding formulas in a shared workbook – Sheet protection doesn't work in legacy shared workbooks (the old “Share Workbook” feature). Use co-authoring in OneDrive/SharePoint or just protect the sheet normally.
How to Unhide Formulas Later
To show the formulas again, you need to unprotect the sheet first:
- Go to the Review tab and click Unprotect Sheet (if you set a password, enter it).
- Select the cells with hidden formulas.
- Open Format Cells (Ctrl+1) and go to the Protection tab.
- Uncheck the Hidden box.
- Click OK.
You don't need to re-protect the sheet unless you want to hide the formulas again. If you do, repeat the protection steps.
Limitations and Security Reality
Hiding formulas is not true security. Anyone who knows Excel can unprotect the sheet by copying the entire sheet to a new workbook or by using VBA to read the formula. If you need to protect intellectual property, consider using Excel's “Very Hidden” sheet feature or moving the calculations to a separate file. But for casual sharing and preventing accidental edits, hiding formulas is perfectly adequate.
Also, the hidden formula bar only hides the formula in the Excel interface. If you export the sheet to PDF or print it, the formulas are not shown anyway. If you copy the cell to another location, the formula is copied along with it, so be careful when sharing ranges.
Alternatives to Hiding Formulas
- Convert formulas to values – If you don't need the formulas to recalculate, copy the cells and paste as values (right-click > Paste Special > Values). This removes the formulas entirely.
- Use a password-protected workbook – Protect the entire workbook structure so users can't view the sheet formulas at all (Review > Protect Workbook).
- Use a separate calculation sheet – Put all formulas on a hidden sheet and only show the results on a visible sheet. You can hide the sheet entirely (right-click tab > Hide).
Frequently Asked Questions
Can I hide formulas without protecting the sheet? No. The Hidden property only takes effect after you protect the sheet. You must protect the worksheet for the formula bar to hide the formula.
Why is the formula bar still showing the formula after I checked Hidden? You likely haven't protected the sheet yet. Go to Review > Protect Sheet and enable protection. Also make sure the cells you selected are the ones with the formulas.
Can I hide formulas for only some cells? Yes. Select only the cells you want to hide, set their Hidden property, and protect the sheet. Other cells will still show formulas in the formula bar.
Does hiding formulas prevent users from editing them? Yes, because the cells are locked and the sheet is protected. Users cannot edit locked cells unless you give them permission in the Protect Sheet dialog.
What if I forget the password to unprotect the sheet? There is no official way to recover a lost password in Excel. You can try third-party tools, but they may not work for all versions. Always keep a backup of the unprotected file.
Can I still see the formula if I select the cell and look at the formula bar? No, that's the whole point. The formula bar will be empty, and the cell will show only the result. However, if you click on the cell and press F2, Excel will show the formula in the cell itself (unless you also disable editing). To prevent that, you can uncheck Edit directly in cell in Excel Options, but that's a global setting.