How to Lock Cells in Excel (2026 Guide)
Home›Guides›Lock Cells
ExcelHow-To⏱ 2 min read

How to Lock Cells in Excel

Locking cells in Excel is a two-step process: mark cells as Locked, then enable sheet protection. Understanding the two-step model is the key — miss either step and the lock doesn't work.

⚡ Quick Answer

Unlock all cells first (Select All → Format Cells → Protection → uncheck Locked). Then select the cells you want to protect and re-check Locked. Finally, go to Review → Protect Sheet. Only the locked cells are now uneditable.

How Excel locking actually works

By default, every cell has the "Locked" property set to True. But this property does nothing unless you also enable sheet protection. That's why beginners are surprised when protecting the sheet locks everything — because everything was marked Locked already.

The mental model

Locked is a per-cell property (like a switch on each cell). Protect Sheet is the master power that activates every Locked switch. To protect only some cells, turn off the switch on cells you want editable, then flip the master power on.

Step-by-step: Lock specific cells

  1. Unlock all cells first

    Press Ctrl + A to select all cells. Press Ctrl + 1 to open Format Cells. Click the Protection tab. Uncheck the Locked box. Click OK.

  2. Select the cells you want to lock

    Highlight the specific cells or ranges you want to protect from editing (e.g., a formula column, header row, calculated totals).

  3. Enable Locked on those cells

    Press Ctrl + 1, go to Protection tab, check Locked, click OK.

  4. Turn on sheet protection

    Go to Review → Protect Sheet. Optionally enter a password. Choose which actions users can still perform (default: select cells, select locked cells). Click OK.

Result: only the cells you marked Locked in step 3 are protected. All other cells are freely editable.

Common use cases

Lock formulas but leave inputs editable

You have a calculator sheet with input cells (yellow) and formula cells (that shouldn't be changed). Unlock all cells, then select only the formula cells and lock them. Protect the sheet. Users can change inputs; formulas are safe.

Lock header row and label column

You want the header row and first column to stay put. Unlock all cells, select row 1 and column A, lock them, protect sheet.

Lock everything except one range

Faster path: leave Locked as default (True on all cells). Select the range you want editable, uncheck Locked. Protect sheet. Everything is locked except that one range.

Protection options in the Protect Sheet dialog

When you protect a sheet, Excel lets you choose what users can still do:

  • Select locked cells — users can click but not edit locked cells (checked by default)
  • Select unlocked cells — users can click and edit unlocked cells (checked by default)
  • Format cells / columns / rows — allow formatting changes
  • Insert / delete rows / columns — allow structural changes
  • Sort / AutoFilter / Use PivotTable — allow specific data operations
Passwords have a limit

Excel sheet protection is a mild deterrent, not real security. Passwords can be removed by tools freely available online. If your data is truly sensitive, don't rely on sheet protection — use file-level encryption (File → Info → Protect Workbook → Encrypt with Password) or store the data somewhere with real access controls.

How to unlock a protected sheet

  1. Open the sheet

    Navigate to the protected worksheet.

  2. Click Review → Unprotect Sheet

    If no password was set, protection is removed immediately. If a password was set, enter it in the dialog and click OK.

Keyboard shortcuts

Cell Locking Shortcuts

Open Format CellsCtrl + 1
Select all cellsCtrl + A
Open Protect Sheet dialogAlt + R + P + S
Unprotect SheetAlt + R + P + S (toggle)
Better Templates

Excel Wizard — build forms with proper input validation

Locking cells is a workaround for "some cells should be editable, others not." The real solution is proper input validation with clear error messages. Excel Wizard's AI can generate data validation rules that catch bad input before it corrupts your model — much better than hoping users don't accidentally edit the wrong cell.

Install Excel Wizard →

Frequently asked questions

How do I lock only specific cells in Excel?

By default all cells are Locked but the protection only activates when you Protect the sheet. To lock only some cells: (1) Select all cells and uncheck Locked in Format Cells → Protection. (2) Select the cells you want protected and check Locked. (3) Go to Review → Protect Sheet. Only the cells you marked Locked are now protected.

Why are all my cells locked when I protect the sheet?

Because every cell has Locked=True as the default. Protecting the sheet activates that property for every cell. To lock only some cells, you must first unlock all cells (select all → Format Cells → Protection → uncheck Locked), then explicitly lock the ones you want protected before enabling Protect Sheet.

Can I lock cells without a password?

Yes. When you go to Review → Protect Sheet, leaving the password field blank still activates protection — anyone using the file can't edit locked cells, but they can unprotect the sheet without a password. Adding a password only prevents someone from clicking Unprotect Sheet.

How do I unlock a locked Excel sheet?

Go to Review → Unprotect Sheet. If a password was set, you'll need to enter it. Once the sheet is unprotected, all Locked cells become editable again — the Locked property remains but has no effect until you protect the sheet again.