Protect Your Data by Locking and/or Hiding Formulas in Microsoft Excel
by Avantix Learning Team | Updated November 24, 2019
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 button on the Formulas tab in the Ribbon (you can also press Control + ~):
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.
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 wish 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.
To request this page in an alternate format, contact us.
Related Microsoft Excel Training Courses
Copyright 2020 Avantix® Learning Inc.
You may also like
A pivot table can be deleted in an Excel workbook in several ways. You can delete a pivot table, convert a pivot table to values or clear data and customizations from a pivot table to reset it. When a pivot table is created from source data in a workbook,
Depending on your country or region, Excel may display decimal points or dots instead of commas for larger numbers. The decimal point (.) or comma (,) is used as the group separator in different regions in the world. You can change commas to decimal points or dots or vice versa in your Excel workbook temporarily or permanently.
You can group by month, year or other date period in a pivot table in Excel. One option is to group by date periods in a pivot table using the Grouping feature. Alternatively, you can also create calculations in source data to extract the month name and the year from a date field and use the fields in your pivot table.
Avantix Learning | 1 Yonge Street, Suite 1801 (Toronto Star Building), Toronto, Ontario, Canada M5E 1W7 | firstname.lastname@example.org