How to Protect Just Some Cells in Excel
In this article
To protect only some cells in Excel, first unlock the cells you want people to edit, then turn on sheet protection. By default every cell is locked, but locking does nothing until protection is enabled. So the order matters: select the editable cells, clear their Locked property, then protect the sheet. You can do this in a few minutes on Windows or Mac, and the same idea works in Excel for the web.
What You'll Need
- Excel for Windows, Mac, or Excel for the web. Menu names differ slightly by version, platform, and region.
- A workbook with the sheet you want to protect open.
- Optional: a password if you want to stop others from turning protection off. Store it somewhere safe; a forgotten password cannot be recovered by Microsoft.
Step-by-Step
- Decide which cells should stay editable. Write down the ranges, for example B2:B10 for input and the rest locked. Protecting everything except a few cells is the usual goal, and it is easier to select the small editable area than the large locked one.
- Select the cells to leave editable. Drag across the range, or hold Ctrl (Windows) or Command (Mac) and click multiple ranges. You can also select entire rows or columns if those should be open.
- Open the Format Cells dialog. Right-click the selection and choose Format Cells, or press Ctrl+1 (Windows) or Command+1 (Mac). Go to the Protection tab.
- Clear the Locked checkbox. This marks the selected cells as unlocked. Click OK. Nothing changes visually yet, and that is normal.
- Turn on sheet protection. Go to the Review tab and choose Protect Sheet. If you do not see it, make sure you are not editing inside a cell.
- Set the protection options. In the Protect Sheet dialog, tick the actions you want to allow, such as selecting locked cells, selecting unlocked cells, and formatting. Leave the ones you do not want people to use unticked. The default allows selecting both locked and unlocked cells, which is usually fine.
- Add a password if needed. Type it in the password box and confirm. Skip this if you only want to prevent accidental edits; without a password, anyone can unprotect the sheet via Review > Unprotect Sheet.
- Click OK and test. Try typing in a locked cell; Excel should refuse with a message that the cell is protected. Try typing in an unlocked cell; it should accept the entry. If both behave as expected, you are done.
Common Mistakes
- Protecting before unlocking. If you enable Protect Sheet first, every cell is locked. Unlock the editable cells first, or unprotect, unlock, and protect again.
- Unlocking the wrong cells. It is easy to select one range and then click a different cell before opening Format Cells. Check the Name Box shows the range you intended.
- Forgetting that locked cells still show data. Protection stops editing, not viewing. Anyone who can open the file can read the locked cells unless you also restrict access to the file itself.
- Assuming protection is security. Sheet protection is a guard against accidental changes, not encryption. Someone determined can copy the values out. For sensitive data, use file-level protection and store the file where only trusted people can reach it.
- Locking formula cells but leaving their inputs open. That is usually correct, but if users can change an input that a locked formula depends on, the formula result changes. Decide whether that is acceptable.
- Protecting the workbook instead of the sheet. Workbook protection controls structure such as adding or deleting sheets; it does not lock cells. Use Protect Sheet for cell-level control.
Tips
- Colour unlocked cells with a light fill so users can see where to type. Formatting is separate from locking, so this does not affect protection.
- Use Review > Allow Edit Ranges if you want specific users to edit specific ranges with their own passwords. This is more granular than unlocking cells for everyone.
- If the sheet has formulas, keep those cells locked and leave only the input cells unlocked. That is the standard pattern for a simple form.
- Test on a copy before sending the file out. It is easy to miss a cell that should have been unlocked.
- Record the password in a password manager. Excel cannot recover a lost sheet password.
Troubleshooting
- Excel will not let you edit a cell you thought was unlocked. Unprotect the sheet (Review > Unprotect Sheet), select the cell, open Format Cells > Protection, and confirm Locked is unticked. Then protect again.
- The Protect Sheet button is greyed out. The sheet may already be protected, or the workbook may be shared or marked as final. Check the Review tab for Unprotect Sheet, and check the title bar for read-only status.
- You cannot remember the password. There is no built-in recovery. If you have a backup without protection, use it. Otherwise the protected content cannot be unlocked through Excel's normal menus.
- Users can still change things you wanted locked. Review the options ticked in the Protect Sheet dialog. Allowing formatting or inserting rows can let users alter the layout even when cells are locked.
- Protection disappeared after saving. Make sure you saved the file after enabling protection, and that you are opening the same copy. If the file is stored in a shared location, someone else may have unprotected it.
- You need different cells open for different people. Use Allow Edit Ranges with separate passwords, or provide separate copies of the workbook.
Frequently Asked Questions
Does locking a cell do anything on its own?
No. Locking only takes effect when sheet protection is turned on. Unlock the cells you want editable, then protect the sheet.
Can I protect some cells without a password?
Yes. Leave the password box blank. Protection still stops accidental edits, but anyone can remove it through Review > Unprotect Sheet.
Can I protect only part of a worksheet?
Not by area in the sense of a boundary. You protect the whole sheet and unlock the cells you want people to use. Everything else stays locked.
Does protecting cells stop people from copying the data?
No. Sheet protection prevents editing, not copying or viewing. If the data is sensitive, restrict who can open the file.
Can I unlock cells on a protected sheet later?
Only after unprotecting the sheet. Unprotect, change the Locked setting in Format Cells, then protect again.
Does this work in Excel for the web?
Yes, basic sheet protection is available there, though the dialog options are more limited than in the desktop app. Menu labels can differ slightly by version and platform.