Locking individual cells in Excel stops other people (or you, by accident) from editing specific cells while leaving the rest of the sheet open for input. It works by marking cells as locked or unlocked, then turning on sheet protection. Nothing is protected until that second step is done, and by default every cell in a sheet is already marked as locked, so the trick is to unlock everything you want to stay editable first.
What You'll Need
- Excel for Windows or Mac (the steps below are for the desktop version; labels can differ slightly by version and platform)
- Or Excel for the web, which supports the same Protect Sheet feature, though with fewer options
- A spreadsheet with at least some cells you want to protect
Step-by-Step
- Open your workbook and go to the sheet you want to protect.
- Select all cells on the sheet by clicking the triangle in the top-left corner of the sheet grid (above row 1 and left of column A), or press Ctrl+A (Cmd+A on Mac).
- Right-click the selection and choose Format Cells. On the Protection tab, untick the Locked checkbox and click OK. This marks every cell on the sheet as unlocked, meaning nothing is protected yet.
- Select the individual cells, ranges, or entire rows and columns you want to lock. Hold Ctrl (Cmd on Mac) to select several separate areas at once.
- Right-click the selection, choose Format Cells, and on the Protection tab tick the Locked checkbox. Click OK.
- Go to the Review tab on the ribbon and click Protect Sheet. In Excel for the web, it is under Review > Protect Sheet as well.
- Optionally enter a password. Anyone with the password can unprotect the sheet; without one, anyone can unprotect it from the same button. If you set a password, write it down somewhere safe, because Microsoft cannot recover a lost sheet password.
- In the list of actions, make sure Select unlocked cells is ticked so users can still work in the open cells. Leave Select locked cells ticked or unticked depending on whether you want people to be able to click into the locked cells. Click OK.
- Test it: click a locked cell and try to type. Excel should show a message saying the cell is on a protected sheet. Then try typing in an unlocked cell to confirm it still accepts input.
Common Mistakes
- Locking cells but never clicking Protect Sheet. The Locked property does nothing on its own; until the sheet is protected, every cell stays editable.
- Protecting the sheet without unlocking the input cells first. Because all cells start out locked, this makes the whole sheet read-only and you will get the protection warning everywhere.
- Forgetting the password. There is no official recovery for a lost sheet protection password, so keep a record of it.
- Confusing Protect Sheet with Protect Workbook. Protect Workbook guards the structure (adding, deleting, or hiding sheets), not cell contents.
- Trying to lock cells on a shared or co-authored workbook in real time. Protection is applied per sheet, and co-authors may still see changes in unlocked cells while the file is open.
Tips
- Lock formulas, not labels only. Formula cells are the ones most often damaged by stray typing, so those are the priority candidates for locking.
- You can also hide formulas: on the same Protection tab in Format Cells, tick Hidden. Once the sheet is protected, the formula bar will no longer show the formula in those cells.
- To adjust the locked set later, click Unprotect Sheet on the Review tab, change the Locked settings, then protect again.
- Leave yourself a quick way back: if you forget the password, you can still copy the sheet's contents to a new workbook, but formatting and structure may need rebuilding, so a password manager is the safer habit.
- If you only need to stop accidental edits and the file stays with you, protecting without a password is fine; the protection is against accidents, not against determined users.
Troubleshooting
- Every cell gives the protection warning. You protected the sheet before unlocking anything. Click Review > Unprotect Sheet, select all cells, unlock them, re-lock only the ones you want, and protect again.
- Locked cells still accept edits. The sheet is not protected. Go to Review and click Protect Sheet; check whether the button reads Unprotect Sheet, which means protection is on but those cells were not marked as Locked.
- The Protect Sheet button is greyed out. The workbook structure may itself be protected, or the file is read-only or shared from another location. Open the file locally with full permissions, or remove workbook protection first via Review > Protect Workbook if you have the password.
- Protected cells behave oddly in Excel for the web. The web version has fewer protection options than the desktop app, so set up complex protection in the desktop version and then work with the file online.
- You lost the password. There is no official way to remove it. Your realistic options are restoring an earlier version from your backup or file history, or copying the data into a new workbook and recreating the formatting.
Frequently Asked Questions
Can I lock cells without a password?
Yes. When you click Protect Sheet, just leave the password box empty. The cells are still protected against casual edits, but anyone can turn protection off from the Review tab.
Why are all my cells already marked as locked?
Locked is the default state for every cell in a new sheet. It has no effect until you protect the sheet, which is why a fresh workbook is still fully editable.
Can I lock different cells for different people?
Not within one sheet. Sheet protection is all-or-nothing per sheet. A common workaround is to give different people their own copy of the file, or use separate sheets with different protections for each area.
Does protecting a sheet hide my data?
No. Locked cells remain fully visible; they just cannot be edited. To hide contents you would need to hide the rows or columns, and even that is only a light measure, not real security.
Is sheet protection secure encryption?
No. It is a convenience feature to prevent accidental edits, not strong security. For genuinely sensitive data, use the password-to-open option under File > Info > Protect Workbook, which encrypts the file itself.