How to protect a sheet in Excel (and allow some cells to edit)
In Excel for Microsoft 365 / Excel 2021–2024 (verified 2026-10-24), unlock input cells first (Format Cells > Protection → clear Locked), then choose Review > Protect Sheet, tick what users may still do (select cells, sort, etc.), optionally set a password, and click OK.
Everything still Locked (the default for all cells) becomes read-only for editing. Review > Unprotect Sheet removes protection (password required if you set one).
Applies to Excel for Microsoft 365, Excel 2021/2024 and Excel for Mac. Sheet protection stops accidental edits; it is not strong encryption. For real secrecy use file encryption and careful sharing. See also lock cells for the unlock step alone.
Protect a sheet with editable inputs
Unlock the cells people may edit
- Select the input range (for example a yellow "Enter data here" block).
- Press Ctrl+1 (Format Cells) > Protection tab.
- Clear Locked, click OK.
- Optional: Review > Allow Users to Edit Ranges to name ranges before protecting.
Turn on Protect Sheet
- Go to Review > Protect Sheet.
- Tick the actions you still want (at minimum Select unlocked cells).
- Enter an optional password, click OK, and confirm the password.
- Try editing a locked cell — Excel should block it — then edit an unlocked cell to confirm inputs work.
Unprotect later
- Go to Review > Unprotect Sheet.
- Enter the password if prompted.
- Save the file so colleagues get the unprotected version only when you intend it.
Protect Sheet vs Protect Workbook vs file password
| Feature | Stops | Does not stop |
|---|---|---|
| Protect Sheet | Editing locked cells / disallowed actions | Opening the file; determined attackers |
| Protect Workbook (structure) | Adding/moving/deleting sheets | Cell edits on unprotected sheets |
| Encrypt with password (File > Info) | Opening without the password | Sharing the password insecurely |
Our take: use Protect Sheet for templates and data-entry forms; use file encryption when the workbook itself is confidential.
If it fails
- Cannot edit cells you thought were unlocked: Protect Sheet was applied before you cleared Locked — unprotect, unlock, re-protect.
- Forgot password: Microsoft cannot recover sheet passwords for you. Keep a password vault entry; keep an unprotected master offline for critical templates.
- Sort / Filter greyed out: those actions were not ticked in Protect Sheet — unprotect and re-protect with Sort / AutoFilter allowed.
- Excel for the web: protection options are limited; use desktop Excel for complex protection.
Frequently asked questions
How do I protect a sheet but allow editing some cells?
Unlock those cells in Format Cells > Protection, then Review > Protect Sheet.
Is Excel sheet protection secure?
It prevents casual edits, not serious attacks. Use file encryption for confidential data.
How do I unprotect a sheet?
Review > Unprotect Sheet, then enter the password if you set one.
What is Allow Users to Edit Ranges?
A Review-tab feature to grant edit rights to specific ranges before protecting the sheet.
Does Protect Sheet hide formulas?
Tick Hidden on formula cells in Format Cells > Protection before protecting, and they stay hidden while protected.