How To Lock Cells In Excel

4 min read|Last Updated: August 8th, 2023|Categories: excel|
table of content

We need to know how to lock our momentous cells in Excel to prohibit anybody from reformatting or deleting them. It may be required, particularly when you share (internal link: How to Share Excel blog) your data.

Here are different cases you may want to lock the cells to prevent users from changing or erasing the values accidentally in Excel:

  1. Cells locked by default
  2. Lock all the cells in a worksheet
  3. Lock the worksheet except for a few cells
  4. Lock some specific cells
  5. Hide the formulas when cells are locked

In this tutorial, we are going to learn all these cases.

Cells Locked by default

When you open a worksheet, all of your cells are locked by default. Select any cell you want, Right-click on it, and choose Format Cell.

Note: Other ways to open the Format Cells dialogue box are:

  1. Go to the Home tab from the ribbon.
  2. Click on the small arrow in the Alignment group, the Format Cells dialogue box opens up.

  • Use the keyboard shortcut Ctrl+1 to open this window.

The Format Cells options in Excel
Picture 1- The Format Cell

Then choose the Protection tab from the format cell dialogue box. Now you can see the Locked checkbox is enabled. But how can we edit the cells although they’re locked?

Actually, cells are ready to protect.

The Protection tab from the Format Cells dialog box.

picture 2- The Format Cell dialogue box

Lock All the Cells in a Worksheet

To protect all cells in a worksheet:

  1. Go to the Review tab from the toolbar.
  2. In the Changes group, choose the Protect Sheet option, the Protect Sheet dialogue box opens up.
  3. Enter a password that is asked to unprotect the sheet (optional) and re-enter it.
  4. Press OK.

How to protect a sheet in Excel?

Picture 3- Lock all cells in a worksheet

This method will protect your worksheet, whether cells are locked or unlocked.

After protecting the sheet whenever anyone tries to edit the cells, this massage will open up:

Microsoft Excel massage when you want edit a locked cell

Picture 4- Microsoft Excel massage to unprotect the sheet

Lock the Entire Sheet Except a Few Cells

Sometimes you need some transformative cells in a protected worksheet. Follow these steps below (according to video 1):

  1. Select the cell you want to be unlocked (cells you want to be editable after protecting the sheet.)
  2. Press Ctrl+1 to open the Format Cells dialogue box.
  3. Go to the Protection tab.
  4. Uncheck the Locked checkbox (which is checked by default.)
  5. Press OK.
  6. Go to the Review tab from the toolbar.
  7. In the Changes group, select the Protect Sheet to open the Protect Sheet dialogue box.
  8. Enter a password (optional).
  9. Press OK.

Now you can change the unlocked cells.