How to protect a sheet in Excel (and allow some cells to edit)

Updated · DeskHowTo

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).

Jump to

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

  1. Select the input range (for example a yellow "Enter data here" block).
  2. Press Ctrl+1 (Format Cells) > Protection tab.
  3. Clear Locked, click OK.
  4. Optional: Review > Allow Users to Edit Ranges to name ranges before protecting.

Turn on Protect Sheet

  1. Go to Review > Protect Sheet.
  2. Tick the actions you still want (at minimum Select unlocked cells).
  3. Enter an optional password, click OK, and confirm the password.
  4. Try editing a locked cell — Excel should block it — then edit an unlocked cell to confirm inputs work.

Unprotect later

  1. Go to Review > Unprotect Sheet.
  2. Enter the password if prompted.
  3. Save the file so colleagues get the unprotected version only when you intend it.

Protect Sheet vs Protect Workbook vs file password

FeatureStopsDoes not stop
Protect SheetEditing locked cells / disallowed actionsOpening the file; determined attackers
Protect Workbook (structure)Adding/moving/deleting sheetsCell edits on unprotected sheets
Encrypt with password (File > Info)Opening without the passwordSharing 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.

Sources checked: Microsoft Support: Protect a worksheet. Verified October 2026.