To lock cells in Excel and protect them from being edited, follow these steps:
How to Lock Cells in Excel
- Unlock all cells first (optional but recommended if you want to lock only specific cells):
- Select the entire worksheet by pressing Ctrl + A or clicking the triangle at the top-left corner of the sheet.
- Right-click and choose Format Cells , then go to the Protection tab.
- Uncheck the Locked checkbox and click OK. This unlocks all cells so you can selectively lock only those you want protected
- Select the cells you want to lock:
- Highlight the specific cells or ranges you want to protect.
- Right-click, select Format Cells , go to the Protection tab, and check the Locked box. Click OK
- Protect the worksheet:
- Go to the Review tab on the ribbon.
- Click Protect Sheet (or Protect Workbook if you want to protect the entire workbook).
- Set a password if desired (optional but recommended for security).
- Choose what users are allowed to do (e.g., select locked cells, select unlocked cells).
- Click OK to apply protection
Once the worksheet is protected, only the locked cells will be restricted from editing, while unlocked cells remain editable.
Notes:
- By default, all cells are locked but this locking has no effect until the sheet is protected.
- You can unlock some cells before protecting the sheet to allow editing in those areas.
- To remove protection, simply go to Review > Unprotect Sheet and enter the password if set
This method helps protect formulas or important data while allowing input in designated cells, ideal for shared workbooks
. This process works in desktop Excel; Excel for the web does not support locking cells or protecting specific areas