Protect Cells That Contain Formulas
October 28, 2022 - by Bill Jelen
Problem: I have to key in data in a large number of cells in a month-end financial statement. I don’t want to accidentally key in a number in a cell that contains a formula. How can I protect just the formula cells?
Strategy: After unlocking all cells, you can use the Go To Special dialog to select only the cells with formulas and lock just those cells.
By default, all cells in a worksheet start with their Locked property set to TRUE, but you may not realize this until you turn on protection for the first time. The first step is to unlock all the cells:
1. Select all cells by pressing Ctrl+A. Use Ctrl+One to open Format Cells.
-
2. Click on the Protection tab in the Format Cells dialog. You will see that the Locked option is chosen.
3. Uncheck the Locked box. Click OK to close the Format Cells dialog.
4. Select Home, Find & Select, Formulas.
5. Excel will select all formulas on the current worksheet.
6. Select Home, Format dropdown, Lock Cells. This will lock only the selected cells, which are the formula cells.
7. Enable protection for the sheet. (Note that if you skip this final step, you can still accidentally overwrite your formulas.) Select Home, Format dropdown, Protect Sheet.
8. Excel will display the Protect Sheet dialog. The default settings are sufficient protection. Simply click OK.
Now if you accidentally try to enter something in a formula cell, Excel will prevent you from entering the data.
This article is an excerpt from Power Excel With MrExcel