Protect and unprotect a cell or worksheet in Microsoft Excel

Updated: 12/31/2020 by Computer Hope
Illustration: A locked Excel file.

When you create a spreadsheet, you may enter data or formulas that you do not want other users to change. Protecting a cell or worksheet can be essential to maintaining the integrity of data and formulas in a spreadsheet.

In Microsoft Excel, you can protect one or more cells, or protect an entire worksheet, preventing other users from changing the data in the cells or worksheet. After locking and protecting cells or worksheets, to edit them again, you must unprotect them. Select a link below to learn how to protect and unprotect a cell or worksheet in Microsoft Excel.

How to protect a cell

To protect a cell in Microsoft Excel, follow the steps below.

  1. Select all cells in the worksheet by clicking the Select All button, found above the row numbers and to the left of the column headers.

Select All button in Microsoft Excel

  1. Press Ctrl+1 to open the Format Cells window. You can also use Ctrl+Shift+F combination to open the Format Cells window.
  2. In the Format Cells window, click the Protection tab.
  3. Uncheck the box for the Locked option, then click OK.

Unlock all cells in Microsoft Excel

  1. In the worksheet, select the cell you want to lock and protect.
Tip

If necessary, you can select more than one cell to protect. For help to select more than one cell, see: How to select one or more cells in a spreadsheet program.

  1. Open the Format Cells window by pressing Ctrl+1 combination again.
  2. Click the Protection tab, check the box for the Locked option, then click OK.
  3. In the menu bar, click the Review tab.
  4. In the Protect group, click the Protect Sheet option.

Review tab - Protect worksheet option in Microsoft Excel

  1. The Protect Sheet window opens. Enter a password for unlocking the protected cells in the Password to unprotect sheet text field.
  2. In the Allow all users of this worksheet to section, make sure only the box for the Select unlocked cells option is checked, then click OK.

Protect cells in Microsoft Excel

  1. Enter the password again in the Confirm Password window and click OK.

How to protect a worksheet

To protect a worksheet in Microsoft Excel, follow the steps below.

  1. Select all cells in the worksheet by clicking the Select All button, found above the row numbers and to the left of the column headers.

Select All button in Microsoft Excel

  1. Press Ctrl+1 to open the Format Cells window. You can also use Ctrl+Shift+F combination to open the Format Cells window.
  2. In the Format Cells window, click the Protection tab.
  3. Make sure the box for the Locked option is checked. Click the box to check it if it's not already checked.

Lock all cells in Microsoft Excel

Note

A smaller solid black box inside the Locked checkbox Partial locked cells indicator in Microsoft Excel means some cells in the worksheet are currently locked and other cells are unlocked.

  1. In the menu bar, click the Review tab.
  2. In the Protect group, click the Protect Sheet option.

Review tab - Protect worksheet option in Microsoft Excel

  1. The Protect Sheet window opens. Enter a password for unlocking the protected cells in the Password to unprotect sheet text field.
  2. In the Allow all users of this worksheet to section, make sure only the box for the Select unlocked cells option is checked, then click OK.

Protect worksheet in Microsoft Excel

  1. Enter the password again in the Confirm Password window and click OK.

How to unprotect a cell or worksheet

To unprotect a cell or worksheet in Microsoft Excel, follow the steps below.

  1. In the menu bar, click the Review tab.
  2. In the Protect group, click the Unprotect Sheet option.
  3. In the Unprotect Sheet sheet window that pops up, enter the password to unlock the worksheet, then click OK.

Unprotect worksheet in Microsoft Excel