Skip to content

Smart home, audio and desk gear, chosen with care.

Set It Up

How to lock cells in Excel without locking the whole sheet

Learn how to lock cells in Excel properly: unlock the input cells, switch on sheet protection and avoid the common mistake that leaves everything editable.

Set It Up
Man in suit typing on a laptop at a white table

The short answer: locking is a two-part job

Locking a cell in Excel is not a single switch. Every cell has a Locked setting, but that setting has no effect until you protect the worksheet. If you tick Locked and nothing seems to happen, you have only done half the job.

The dependable way to lock only some cells is:

  • select the cells you want people to be able to edit
  • open Format Cells and clear the Locked tick box
  • protect the sheet

Everything else stays locked by default, so the input cells remain editable and the rest cannot be changed.

If you want the opposite — most of the sheet editable and a few cells locked — select just those cells, tick Locked, then protect the sheet. The principle is the same.

What Locked, Hidden and Protect Sheet actually do

Locked ticked
Blocks editing of that cell once the worksheet is protected. Excel starts with this ticked for every cell.
Locked cleared
Leaves the cell editable after you protect the worksheet.
Hidden ticked
Hides the formula from the formula bar after protection. The calculated result still shows.
Protect Sheet
Switches on the restrictions for the current worksheet only — not the whole workbook.
Password
Optional. It deters casual changes, but Microsoft does not provide a recovery route if it is lost.

Two details explain most confusion. Locked is a property of the cell, while Protect Sheet is a property of the worksheet. A protected sheet can still allow sorting, filtering or formatting if you tick those options in the Protect Sheet dialogue box.

Before you start

Use Excel for Windows or Mac if you need to change which individual cells are locked. The desktop app gives you the full Format Cells > Protection controls; Excel for the web is more limited.

You do not need a password to lock cells. A password only controls who can remove protection. If you set one, keep it somewhere you can find it.

It also helps to know which cells should remain editable. Typical examples are the input cells in a budget, a quote form or a score sheet. Write down the range if it is not obvious, for example C5:C12.

Step by step: lock cells and keep input cells editable

  1. 01 /

    Choose the cells that should stay editable

    Decide which cells users need to type in. If you protect the sheet without doing this, every cell will be locked because Excel's default is Locked for all cells.

  2. 02 /

    Select those cells

    Click and drag, or type the range into the Name Box. For separate ranges, hold Ctrl on Windows or Command on Mac while selecting.

  3. 03 /

    Clear the Locked tick box

    Press Ctrl+1 on Windows or Command+1 on Mac to open Format Cells. Go to the Protection tab, clear the Locked tick box and click OK. Do not tick Hidden unless you also want to hide formulas.

  4. 04 /

    Check any cells that must be locked

    If you previously unlocked cells and now want them locked, select them, open Format Cells > Protection and tick Locked. Otherwise leave them alone: they are already locked by default.

  5. 05 /

    Protect the worksheet

    Go to Review > Protect Sheet. Enter a password only if you need one. Tick the actions users may still perform, such as selecting unlocked cells or using AutoFilter. Click OK and confirm the password if prompted.

  6. 06 /

    Test both kinds of cell

    Type in an unlocked input cell — it should accept the entry. Try to type in a locked cell — Excel should refuse. If both accept typing, the sheet is not protected or you protected a different tab.

The mistake almost everyone makes

The common failure is ticking Locked and stopping there. Because Excel marks every cell as Locked by default, that action changes nothing visible. The cell still accepts typing until the sheet is protected.

If locking appears to do nothing, go to Review and check whether Protect Sheet is active. The button changes to Unprotect Sheet when protection is on. Also confirm you are on the right worksheet: protection applies per tab, so a protected 'Inputs' sheet does not protect 'Summary'.

Lock formulas but keep the input cells editable

This is the version most people need for a calculator, budget or quote. You want people to type in the pale-yellow cells but not overwrite the formulas.

  • Unlock every input cell: select them, open Format Cells > Protection and clear Locked.
  • Leave the formula cells as they are. They are locked by default.
  • If you want the formula itself to be invisible while the sheet is protected, select the formula cells, open Format Cells > Protection and tick Hidden as well as Locked.
  • Protect the sheet, then test an input cell and a formula cell.

Hidden only takes effect after protection, and it does not encrypt the formula. Anyone who can unprotect the sheet can read it. Use Hidden to keep the sheet tidy, not to protect a trade secret.

If your sheet contains an Excel Table

Excel Tables can need extra permissions. When a sheet containing a table is protected, users may be unable to add rows, sort or use filters unless you allow those actions in the Protect Sheet dialogue box. Tick Insert rows, Sort or Use AutoFilter as needed.

If the table is central to the workflow, protect a copy first and run through the actions a colleague will need. Protection is easier to adjust before people start using the file.

Unlocking cells and removing protection

To edit a locked cell, you do not hunt for an unlock button on the cell. Remove protection from the sheet: go to Review > Unprotect Sheet and enter the password if one was set. The cell's Locked property stays as it was, but the restriction is lifted.

To change which cells are locked, unprotect the sheet, change the Locked tick boxes in Format Cells > Protection, then protect the sheet again. If you want no locking at all, clear Locked on the relevant cells and leave the worksheet unprotected — but remember that an unprotected sheet has no cell locking.

Common problems and fixes

  • I ticked Locked but can still type. The worksheet is not protected. Go to Review > Protect Sheet.
  • No cell accepts typing, including the input cells. You protected the sheet before clearing Locked on the input cells. Unprotect the sheet, clear Locked on those cells, then protect again.
  • The Protection tab is unavailable. The sheet is probably already protected, or the workbook is shared. Unprotect the sheet first and check sharing settings.
  • I forgot the password. Microsoft does not provide a recovery option for a forgotten sheet password. Restore an earlier copy if you have one, or rebuild the protection.
  • Locked cells can still be selected and copied. That is normal. Protection stops edits, not viewing. If you do not want people to select locked cells, clear Select locked cells in the Protect Sheet options — but this is still not confidentiality.
  • Some formatting or sorting still works. You allowed it in the Protect Sheet dialogue box. Unprotect the sheet and review the ticked permissions.

Safety, passwords and limits

A Protect Sheet password is optional, but a forgotten one is a nuisance. Microsoft does not offer a password recovery service for sheet protection. Store the password with the master copy of the workbook, not in a cell on the same sheet.

Before sending a protected workbook to a colleague or client, open a copy and test the cells they will need. Check that the unlocked cells accept entries, the locked cells refuse them, and any sorting or filtering they rely on still works.

Locking cells: quick answers

Do I need a password to lock cells in Excel?

No. Sheet protection works without one, and cells stay locked while the sheet is protected. A password only makes it harder for someone to switch protection off; without it, anyone can use Review > Unprotect Sheet.

Can I lock a single cell without protecting the sheet?

No. The Locked setting is inactive until the worksheet is protected. You can protect the sheet and allow most actions, but there is no per-cell lock that works on an unprotected sheet.

Does locking a cell hide its formula?

Not by itself. Tick Hidden in Format Cells > Protection before protecting the sheet if you want the formula bar to show nothing for that cell. The result still appears in the cell.

Why do all cells lock when I protect the sheet?

Every cell starts with Locked ticked. To keep some cells editable, clear Locked on those specific cells before you protect the worksheet.

Can someone bypass worksheet protection?

A determined user can bypass worksheet protection; it is a guard against mistakes and casual edits, not a security boundary. Use file encryption and access controls for sensitive workbooks.

Search