How to Hide and Protect Formulas in Excel (and Why It's Not Enough)
You spent hours building a pricing model, a quote calculator or a financial simulator in Excel. The formulas are your know-how. Now someone needs to use it, and you don’t want them to see or copy how it works.
Excel has built-in tools to hide and protect formulas. This guide shows how to use them properly, explains what they really protect (less than most people think), and covers the options that actually keep your logic private.
Quick answer
| Goal | Excel feature | Real protection? |
|---|---|---|
| Hide formulas from the formula bar | Format Cells β Protection β Hidden + Protect Sheet | Low: removable |
| Stop people editing formulas | Unlock input cells, then Protect Sheet | Low: removable |
| Stop people unhiding or adding sheets | Protect Workbook (structure) | Low: removable |
| Keep anyone without the password out of the file | Encrypt with Password | High, but whoever has the password sees everything |
| Let people use the calculator without ever receiving the formulas | Share values only, or publish it as a web calculator | High: formulas never leave your hands |
Step 1: Hide formulas from the formula bar
By default, clicking a cell shows its formula in the formula bar. To hide it:
- Select the cells that contain formulas (tip: Home β Find & Select β Formulas selects them all at once).
- Press Ctrl+1 (Cmd+1 on Mac) to open Format Cells.
- Open the Protection tab and tick Hidden.
- Click OK.
Nothing changes yet: the Hidden option only takes effect once the sheet is protected (step 3).
Step 2: Unlock the input cells
Every cell in Excel is Locked by default. If you protect the sheet without changing that, users won’t be able to type anything, including the values your calculator needs.
- Select the cells where users should enter values.
- Press Ctrl+1 β Protection tab.
- Untick Locked and click OK.
Step 3: Protect the sheet
- Go to Review β Protect Sheet.
- Optionally enter a password.
- Keep Select unlocked cells ticked so users can still fill in the inputs. Untick Select locked cells if you don’t want them to click on formula cells at all.
- Click OK (and confirm the password).
Formula cells now show only their result, the formula bar stays empty, and only the unlocked input cells can be edited.
Step 4: Protect the workbook structure
Sheet protection doesn’t stop someone from unhiding a sheet that holds your rates, coefficients or lookup tables. To prevent that:
- Go to Review β Protect Workbook.
- Tick Structure and set a password.
Users can no longer unhide, rename, move, add or delete sheets.
Going further: “very hidden” sheets
A sheet can also be made very hidden, which means it doesn’t appear in the Unhide dialog at all:
- Press Alt+F11 to open the Visual Basic editor.
- Select the sheet in the Project panel and press F4 to show its properties.
- Set Visible to 2 β xlSheetVeryHidden.
It’s a deterrent, not a lock: anyone who opens the VBA editor can set it back.
The catch: Excel protection is not security
Sheet and workbook protection are designed to prevent accidental changes, not to keep secrets. Keep these limits in mind:
- The formulas are still in the file. An
.xlsxfile is a ZIP archive of XML files. Your formulas are stored there as plain text, protected or not. - Sheet passwords can be removed. Deleting the protection tag from the sheet’s XML, or using one of many freely available tools, removes it in minutes. Searching “unprotect excel sheet” is enough to find out how.
- Other spreadsheet apps may not respect it. Opening or importing the file in another tool doesn’t always preserve the protection.
- Encryption works, but only against outsiders. File β Info β Protect Workbook β Encrypt with Password really encrypts the file. But the person you share it with needs the password to use it, and once they open the file they have full access to your formulas.
In short: if you send someone the spreadsheet, you send them your formulas.
Options that actually keep your formulas private
Share the results only
Copy the sheet and use Paste Special β Values, or export it to PDF. The formulas are gone, but so is the interactivity: the recipient can’t enter their own numbers. This works for a one-off report, not for a calculator.
Publish the calculator as a web page
If people need to use your model with their own inputs, put the calculator online instead of sending the file. Users get a form in their browser; the spreadsheet stays with you.
That’s what Appizy does: you upload your .xlsx or .ods file and get an interactive web calculator you can share by link or embed on your website. Calculations run on the server, so end users see the interface (the tabs you left visible) but not the formulas, nor the data and assumptions behind them. Tabs you hide before converting stay on the server. See Application security for the details.
Two honest caveats apply to any calculator you make public, online or not:
- A determined user can still try many inputs to guess how the model behaves. Server-side calculation protects the formulas, not the outputs.
- Put sensitive values (rates, margins, coefficients) in a separate hidden tab, not in collapsed rows or columns of a visible tab. Hidden rows in a visible tab are still part of what gets displayed.
Upload an .xlsx or .ods file and see the result in a few seconds
FAQ
Can I hide formulas in Excel without protecting the sheet?
No. The Hidden cell setting only takes effect once the sheet is protected. Without protection, a custom number format or a white font can hide the value of a cell, but the formula still appears in the formula bar.
Is a protected Excel sheet safe to send to a client?
It prevents accidental edits. It does not prevent a motivated person from reading your formulas, because the protection can be removed and the formulas are stored in the file.
How do I share an Excel calculator without revealing the formulas?
Don’t send the file. Either share static results (values or PDF), or publish the calculator as a web page whose calculations run on a server, so users can enter their own values without receiving the spreadsheet. See how to turn an Excel calculator into a web page.