Excel.Tips.Net ExcelTips (Menu Interface)

Checking Lock Status of Cells

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Checking Lock Status of Cells.

Excel allows you to easily change whether a cell is formatted as locked or unlocked. This attribute is handled on a cell-by-cell basis, even though the effects of the locking (or unlocking) are not evident until such point as you protect the entire worksheet.

Since locking and unlocking can be done on an individual cell basis, you may wonder if there is a way to display the lock status (locked or unlocked) of all your cells in a worksheet, at one time, without the need to check each cell individually.

The default lock status for cells is locked, so it probably makes more sense to select those cells that are unlocked. One way you can do that is to follow these steps, if you are using Excel 2003:

  1. Press Ctrl+F. Excel displays the Find tab of Find and Replace dialog box.
  2. Click the Options button to enlarge the dialog box.
  3. Click the Format button at the right side of the Find What box. Excel displays the Find Format dialog box.
  4. Make sure the Protection tab is displayed. (See Figure 1.)
  5. Figure 1. The Protection tab of the Find Format dialog box.

  6. Make sure the Locked check box is not selected.
  7. Click OK to close the Find Font dialog box.
  8. Click Find All.

At this point, Excel will do one of two things. If it finds any unlocked cells, the addresses of those cells are listed on the screen. If it doesn't find any unlocked cells, then it informs you that it can't find them.

The above technique only works in Excel 2003 because the capability to search for formatting was only added in that version of Excel. Regardless of the version you are using, you can use conditional formatting to highlight unlocked cells. Follow these steps:

  1. Select all the cells you want to check. (You can select all the cells in the worksheet, if you desire.)
  2. Choose Conditional Formatting from the Format menu. Excel displays the Conditional Formatting dialog box.
  3. Change the left-most drop-down list to Formula Is. (See Figure 2.)
  4. Figure 2. The Conditional Formatting dialog box.

  5. In the formula area (to the right of the drop-down list), enter the following formula:
  1. Click the Format button. Excel displays the Format Cells dialog box. (See Figure 3.)
  2. Figure 3. The Format Cells dialog box.

  3. Change the formatting for the cells in any way desired.
  4. Click OK to dismiss the Format Cells dialog box.
  5. Click OK to dismiss the Conditional Formatting dialog box.

Now all the cells in your worksheet that are unlocked will have the formatting you defined in step 6.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10765) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Checking Lock Status of Cells.

Related Tips:

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

Scott Renz    24 May 2016, 13:42
What is the meaning of being Locked or Unlocked? Is it just a word and there for our use and it means whatever we want it to mean? Or is it telling something about the characteristics of the cell?
Rick Rothstein    21 May 2016, 14:13
Besides my earlier tip about selecting all the found cells, here is a code template for those wanting to physically change the format of already formatted cells (in this case, cells that are Unlocked)...

Sub DemoFindReplaceFormats()

  ' Clear any existing Cell Formats
  ' Set the FindFormat search criteria...
  ' multiple criteria can be set if desired
  Application.FindFormat.Locked = False
  ' Set the ReplaceFormat criteria... multiple criteria
  ' can be set if needed (as shown in the next two lines)
  Application.ReplaceFormat.Interior.Color = vbYellow
  Application.ReplaceFormat.Font.Color = vbRed
  ' Perform the Replace operation
  Cells.Replace "", "", SearchFormat:=True, ReplaceFormat:=True
  ' Be nice and clear the Cell Formats so they don't
  ' interfere with the next use of Find or Replace
End Sub
Rick Rothstein    21 May 2016, 13:55
One thing to add to your first procedure (using the Find dialog box)... after you click "Find All" in Step 7, press CTRL+A to select all the cells that were found, then click the "Close" button... all the selected cells will remain selected so you can do things with them (color their interior, bold there font, etc.).
Charles Monroe    21 May 2016, 06:54
I have a convention on all my spreadsheets:
Black text for formulae;
Blue text for data entry;
Green text (to the left of the cell) for cell names;
Red text for warnings & notifications.

I then have two macro's launched by separate buttons on the tool bar:
One macro will "Unprotect" a cell and format it with blue text;
The other macro will "protect" a cell and format it with black text.
As I develop a spreadsheet I simply use the "Unprotect" macro to format any cells as necessary. The second button to run the "Protect" macro is only if I have to change my mind! The blue text shows up clearly as cells which can be changed. Therefore, even if I don't "Protect" the entire worksheet, I am unlikely to overwrite formulae.

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2017 Sharon Parq Associates, Inc.