While creating complex Excel based data input forms many cells needs to be protected from user input, like input labels, table titles, etc... When giving form to production I must be sure that all cells are properly locked. But, how to be sure if this having 1000+ cells ?

I discovered simple and visual technique to quickly detect and show locked and unlocked cells using Excel 2003 or 2007/2010.

Here is real life sheet scenario, 3 pages big Excel form used to capture data input and gather information. Everything must be standardized and locked to maintain data integrity, since form is used in automatic data extraction.

excel view locked unlocked cells

While developing such a form it is very easy to make a mistake and protect the wrong cell or leave cell unprotected. Usually this leads to complains from users or data in wrong cells.

I found the way to check all cells for Locked flag using "Conditional formatting".

# Recipe for excel 2007 how to view locked and unlocked cells visually

1. First select whole sheet by clicking on left upper corner

excel view locked unlocked cells

2. On the Home ribbon click "Conditional Formatting" button and click "New Rule"

excel view locked unlocked cells

  1. In the window appeared choose "Use a formula to determine which cells to format"

excel view locked unlocked cells

Paste this formula:

=CELL("protect", INDIRECT(ADDRESS(ROW(),COLUMN())))=1

Depedning on your windows regional settings, you may require to change "," to ";" in this formula.

Choose format for to identify locked cells, I chose red background.

Voila! Below is same form with protected cells highlighted with red background. It very easy to check now.

excel view locked unlocked cells

After all cells have been fixed, easy to remove this rule using same method.

If you put "=0" at the end of the formula it will show not locked cells, which is very useful to highlight "entry" fields for users, a common and recommended thing to do when protecting sheets.

# Another method for detecting locked and unlocked cells using Find command

You can use the Find for that.

Go to menu Edit->Find, open the Options, open the Format selection and on the protection tab mark the option locked.  With that, you can click on Find All and it will list all the locked cells on the worksheet.

The cells are locked by default, so the list may be really long.