A cell’s Locked setting takes effect only after you protect the worksheet, so first choose which cells are locked or unlocked and then turn on sheet protection.^1^
Lock only selected cells
- Open the worksheet in Excel.
- If it is already protected:
- Select Review → Unprotect Sheet.
- Enter the existing password if prompted.
- Select the entire worksheet by clicking the Select All button at the upper-left corner of the grid, between column A and row 1.
- Press Ctrl+1 to open Format Cells.
- Select the Protection tab.
- Clear Locked, then select OK.
This prepares the sheet so that all cells remain editable.
- Select the cells or ranges that you want to lock.
- To select separate cells or ranges, hold Ctrl while selecting them.
- Press Ctrl+1 again.
- Select Protection, check Locked, and select OK.
- Select Review → Protect Sheet.
- Choose what users may do:
- Keep Select unlocked cells selected so users can enter data in editable cells.
- Clear Select locked cells if users should not even be able to select protected cells.
- Leave permissions such as Delete rows, Delete columns, or Format cells cleared unless users need them.
- Optionally enter a password, select OK, and enter it again to confirm.
The selected cells are now protected, while the other cells remain editable.
Leave only selected cells editable
Because Excel cells are marked as locked by default, this is the shorter method when most of the sheet should be protected:
- If necessary, select Review → Unprotect Sheet and enter the password.
- Select the cells users should be allowed to edit.
- Press Ctrl+1.
- Select Protection.
- Clear Locked and select OK.
- Select Review → Protect Sheet.
- Choose the permitted actions and optionally set a password.
- Select OK.
All cells except the ones you unlocked will become read-only after protection is enabled.
Unlock cells later
To make currently locked cells editable:
- Select Review → Unprotect Sheet.
- Enter the password if prompted.
- Select the cells to unlock.
- Press Ctrl+1.
- Open Protection, clear Locked, and select OK.
- Select Review → Protect Sheet again to protect the remaining locked cells.
To remove protection from the entire sheet instead, stop after selecting Review → Unprotect Sheet.
Password warning
The password is optional. Without one, anyone can unprotect the worksheet. If you use one, keep it in a secure password manager; losing it can prevent access to the protected worksheet elements.^1^
Worksheet protection helps prevent unwanted edits; it is different from encrypting the Excel file or requiring a password to open it.
References
- Lock or unlock specific areas of a protected worksheet | Microsoft Support