Protect Your Data by Locking and/or Hiding Formulas in Microsoft Excel
by Avantix Learning Team | Updated August 14, 2021
Applies to: Microsoft® Excel® 2010, 2013, 2016, 2019 and 365 (Windows)
There are many situations in which you may want to hide formulas in worksheets. Perhaps you don't want a client to see the markup added to the final total or a commission calculation or you simply don't want others to see your formulas. This strategy can be used in earlier versions of Excel as well.
Users have the ability to view formulas in the Formula Bar in Excel when they click on a cell or to use the Show Formulas command on the Formulas tab in the Ribbon (you can also press Ctrl + ~):
You can paste values over formulas but you will then lose the formulas. A great option is to hide formulas using a two-step process – use the Format Cells dialog to hide formulas in cells and then protect the sheet.
Recommended article: Hiding Notes in Excel (Inserting, Editing, Showing, Hiding and Deleting Comments)
Do you want to learn more about Excel? Check out our virtual classroom or in-person classroom Excel courses >
Selecting the hidden and locked options
Choosing the Hidden option for selected cells is the first step in this strategy:
- Select the cells with the formulas you want to hide.
- Right-click the selected cell(s) and choose Format Cells or press Ctrl + 1. The Format Cells dialog appears.
- Click the Protection tab.
- Check Hidden. If you want to protect the cell(s) as well, ensure Locked is checked.
- Click OK. Nothing will appear to occur until you protect the sheet.
Protecting the sheet
The second step in this strategy is to protect the sheet using the Review tab in the Ribbon:
- Display the sheet with the formulas that have the Hidden option checked through Format Cells.
- Click the Review tab in the Ribbon.
- In the Changes group, click Protect Sheet. A dialog box appears.
- Check or uncheck the desired options (you would usually leave the first two checked).
- Enter a password (you will need to set a password or anyone will be able to unprotect the sheet). Passwords are case sensitive and you should keep a copy of your passwords somewhere else.
- Enter the password again.
- Click OK. All formulas you have marked as Hidden will no longer appear in the Formula Bar.
Unprotecting the sheet
To unhide formulas and unprotect the sheet:
- Display the desired sheet.
- Click Unprotect Sheet on the Review tab in the Ribbon.
- Enter the appropriate password.
- Click OK.
Did you find this article helpful? If you would like to receive new articles, join our email list.
Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at email@example.com if you'd like to arrange custom instructor-led virtual classroom or onsite training on a date that's convenient for you.
Copyright 2024 Avantix® Learning
You may also like
There are several strategies to replace zero values (0) with blanks in Excel. If you want to replace zero values in cells with blanks, you can use the Replace command or write a formula to return blanks. However, if you simply want to display blanks instead of zeros, you have two formatting options – create a custom number format or a conditional format.
Power Query in Excel is a powerful data transformation tool that allows you to import data from many different sources and then extract, clean, and transform the data. You will then be able to load the data into Excel or Power BI and perform further data analysis. With Power Query (also known as Get & Transform), you can set up a query once and then refresh it when new data is added. Power Query can import and clean millions of rows of data.
You can freeze one or more rows in an Excel worksheet using the Freeze Panes command. If you freeze rows containing headings, the headings will appear when you scroll down. You can freeze columns as well so when you scroll to the right columns will be frozen.
Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.
Avantix Learning |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at firstname.lastname@example.org