Protect and unprotect a cell or worksheet in Microsoft Excel

Updated: 04/02/2019 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. Being able to protect, or lock, a cell or a worksheet can be important 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 will need to 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 the Ctrl key and the number 1 key together (Ctrl+1) on your keyboard to open the Format Cells window. You can also use the Ctrl+Shift+F key 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.

  1. Open the Format Cells window by pressing the Ctrl+1 key 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 will open. 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 the Ctrl key and the number 1 key together (Ctrl+1) on your keyboard to open the Format Cells window. You can also use the Ctrl+Shift+F key 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 is not already checked.

Lock all cells in Microsoft Excel

Note

If the check box has a smaller solid black box inside it Partial locked cells indicator in Microsoft Excel, that means some of the cells in the worksheet are currently set to be locked, and other cells are set to be 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 will open. 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