Excel: Protect a Worksheet and Lock Specific Cells
You want to let people fill in certain cells while stopping them from changing your formulas, headings, or layout.
Why: This catches everyone out: every cell is locked by default, but locking does nothing until you actually protect the sheet. So the real workflow is to unlock the few cells people may edit, then turn protection on.
Step 1: Unlock the cells people are allowed to edit
Do this first, while the sheet is still unprotected.
- Select the cells (or ranges) you want to leave editable — for example, the input column.
- Open the Format Cells dialog: press Ctrl+1, or go to Home > Format > Format Cells.
- Go to the Protection tab.
- Uncheck the Locked box.
- Click OK.
These cells will stay editable after you protect the sheet. Everything you leave checked (the default) will be locked.
Step 2: Protect the sheet
Now switch protection on so the locked cells are enforced.
- Go to Review > Protect Sheet.
- (Optional but recommended) type a password. Without one, anyone can unprotect the sheet from the same menu. Keep the password somewhere safe — Microsoft can’t recover it.
- In the Allow all users of this worksheet to list, tick the actions you’ll still permit. By default people can select cells; you might also allow Format cells, Insert rows, or Sort.
- Click OK (and re-enter the password to confirm if you set one).
Now anyone editing a locked cell gets a message that the cell is protected, while the unlocked input cells work normally.
Step 3: Turn protection off when you need to edit
- Go to Review > Unprotect Sheet.
- Enter the password if you set one.
The sheet is editable again; repeat Step 2 to re-protect it.
FAQ
I protected the sheet but can still edit every cell. You likely unlocked the cells in Step 1 but never ran Step 2 — or you unlocked more than you meant to. Reopen Format Cells > Protection, confirm which cells are Locked, then protect the sheet.
Can I leave protection on but allow sorting or filtering? Yes — tick Sort and Use AutoFilter in the Protect Sheet options list. Note an AutoFilter must already exist before you protect the sheet.
Does this password encrypt the file? No. Protect Sheet only stops editing of the structure/cells. To stop people opening the file, use File > Info > Protect Workbook > Encrypt with Password instead.
Sources: Microsoft Support — Lock cells to protect them in Excel · Microsoft Support — Protect a worksheet