Excel worksheet with a small padlock motif over a few protected cells while other cells remain open for editing

How to Lock Cells in Excel (2026)

Here’s the part that confuses everyone: in Excel, every cell is “locked” by default, but that does nothing until you protect the sheet. So locking specific cells is really a two-step move — unlock everything, lock the few you want frozen, then protect the sheet. Here’s the reliable way.


1. Why Locking Needs Sheet Protection

The Locked attribute is just a flag. It’s ignored until you turn on Protect Sheet. Because all cells start locked, protecting the sheet immediately would freeze everything — usually not what you want. The trick is to unlock first, then lock only what should be read-only.


2. Lock Only Specific Cells (the Right Order)

  1. Unlock everything: Click the corner (or press Ctrl+A) to select the whole sheet. Press Ctrl+1 (Cmd+1 on Mac) > Protection tab > uncheck Locked > OK.
  2. Lock your target cells: Select just the cells or range you want protected. Press Ctrl+1 > Protection > check Locked > OK.
  3. Protect the sheet: Go to Review > Protect Sheet. Leave “Select locked cells / unlocked cells” ticked, optionally set a password, and click OK.

Now the locked cells refuse edits while the rest stay open.


3. Lock the Entire Sheet

If you want everything read-only, skip the unlocking step — just go to Review > Protect Sheet and click OK, since all cells are locked by default.


4. Unprotect to Make Changes

To edit locked cells again, go to Review > Unprotect Sheet and enter the password if you set one. Make your edits, then re-protect.

Keep the password somewhere safe — there’s no official recovery if you forget it.


5. Lock Formulas but Leave Inputs Open

A common setup: protect formula cells, let people type in input cells.

  1. Unlock the whole sheet (step 1 above).
  2. Use Home > Find & Select > Go To Special > Formulas to select every formula cell at once.
  3. Press Ctrl+1 > Protection > check Locked.
  4. Protect Sheet.

Inputs stay editable; formulas are safe.


6. Troubleshooting

All cells are locked, not just mine

You protected the sheet without unlocking first. Unprotect, unlock the whole sheet, then lock only the cells you want and re-protect.

Locked cells can still be edited

You haven’t protected the sheet yet — locking does nothing on its own. Go to Review > Protect Sheet.

Hide formulas too

In the Protection tab, also check Hidden on the formula cells before protecting — the formula won’t show in the formula bar.

Mac and Web

On Excel for Mac it’s Review > Protect Sheet. Excel for the web has limited protection controls — set locking on the desktop app for full options.


Related Excel guides: How to password protect an Excel file · How to create a drop-down list · How to use conditional formatting · How to unhide columns · How to merge cells

Ready to automate your busywork?

Carly schedules, researches, and briefs you—so you can focus on what matters.

Get Carly Today →

Or explore our free tools