Select the cells, press Ctrl+1, go to the Protection tab, and untick Locked. Then protect the sheet with Review › Protect Sheet so only those cells stay editable.

You have a protected worksheet where most cells are locked, but you need to let people type into a few specific cells, such as an input area or a form. Locking and unlocking cells only takes effect after you protect the sheet, so the order matters.
Step by step
- Select the cells you want people to be able to edit. To allow several separate areas, hold Ctrl while selecting each range.
- Press Ctrl+1 (or right-click and choose Format Cells).
- In the Format Cells dialog, click the Protection tab.
- Untick the Locked checkbox and click OK. The cells are now unlocked, but nothing changes until the sheet is protected.
- Go to the Review tab and click Protect Sheet.
- In the Protect Sheet dialog, leave Allow all users of this worksheet to with the default options (or tick what you need), optionally set a password, and click OK.
- Test it: try typing in an unlocked cell (it should work) and in a locked cell (Excel shows a protected-cell message).
On a Mac: On a Mac, use Format › Cells (or Cmd+1) and the Protection tab works the same; Review › Protect Sheet is also in the Review tab.
Before and after
| A | B | C | |
|---|---|---|---|
| 1 | Name | Score | |
| 2 | Ana | 85 | |
| 3 | Ben | 72 | |
| 4 | Cara | 90 | |
| 5 | Dan | 65 |
| A | B | C | |
|---|---|---|---|
| 1 | Name | Score | |
| 2 | Ana | 85 | |
| 3 | Ben | 72 | |
| 4 | Cara | 90 | |
| 5 | Dan | 65 |
The macro
Press Alt+F11, choose Insert › Module, paste the code, then press F5 to run it. Save the file as .xlsm to keep the macro.
Unlock a range and protect the sheet
Sub UnlockRangeAndProtect()
' Remove protection first (add Password:="..." if the sheet has one)
ActiveSheet.Unprotect
' Unlock cells B2:B5 so users can edit scores
Range("B2:B5").Locked = False
' Protect the sheet again without a password (use a password if needed)
ActiveSheet.Protect Password:=""
End SubPractise it
Free exercises with instant feedback. No sign-up needed.
Common mistakes
- You untick Locked but the cells still can't be edited. Cell locking only applies when the sheet is protected. Go to Review › Protect Sheet to turn protection on.
- You protect the sheet first and then try to unlock cells. Unprotect the sheet first (Review › Unprotect Sheet), unlock the cells, then protect it again.
- You forget the password and can't unprotect the sheet. There is no built-in password recovery. Keep the password in a safe place or protect without a password for internal sheets.
Questions people also ask
How do I unlock all cells in Excel?
Unprotect the sheet first (Review › Unprotect Sheet). Then select all cells (Ctrl + A), press Ctrl + 1, untick Locked on the Protection tab and click OK.
Why are my cells locked by default?
Every cell in a new worksheet has the Locked attribute turned on, but it has no effect until you protect the sheet. Unlock the input cells before protecting.
Can I unlock cells without the password?
No. If the sheet is protected with a password, you need that password to unprotect it. Excel does not provide a way to bypass it.
Steps written for Excel for Microsoft 365 on Windows. All how-to guides