How To Lock Cells And Protect A Sheet In Excel (2026)
In Excel, locking cells does nothing until you also protect the sheet, which is why many people think the feature is broken.
The usual order is to unlock the cells people may edit, then turn on Protect Sheet, with or without a password.
The steps below follow Microsoft’s support pages for Windows and Mac, including how to unprotect a sheet and what protection does not do.
Quick answer: lock cells and protect a sheet
| What you want | Where to go |
|---|---|
| Unlock cells people can edit | Select them, then Format Cells > Protection > clear Locked |
| Turn protection on | Review > Protect Sheet |
| Turn protection off | Review > Unprotect Sheet |
| Let named people edit a range | Review > Allow Edit Ranges (sheet must be unprotected) |
| Hide formulas | Format Cells > Protection > Hidden, then protect the sheet |
Why locking cells alone does nothing
Microsoft says cells already show as locked on a workbook or worksheet you have not protected.
The lock only takes effect once you protect the sheet or workbook.
Microsoft’s best practice is to unlock any cells you may want to change before you protect the sheet, though you can also unlock them afterwards.
Step 1: unlock the cells others can edit
- Select the worksheet tab.
- Select the cells others can edit, using Ctrl+click for cells that are not next to each other.
- Press Ctrl+1, or right-click and choose Format Cells.
- On the Protection tab, clear Locked, then click OK.
On a Mac, Microsoft says to select the cells, open the Format menu, click Cells, and clear Locked on the Protection tab.
Step 2: protect the sheet
- On the Review tab, select Protect Sheet.
- In the Allow all users of this worksheet to list, pick what users may still do.
- Optionally, enter a password in the Password to unprotect sheet box, select OK, then retype it in the Confirm Password box.
On a Mac the list is called Allow users of this sheet to, and the retype box is called Verify.
What you can allow users to do
| Option | What it lets users do |
|---|---|
| Select locked cells | Click on locked cells |
| Select unlocked cells | Click on unlocked cells |
| Format cells, columns or rows | Change formatting |
| Insert columns, rows or hyperlinks | Add them to the sheet |
| Delete columns or rows | Remove them |
| Sort | Sort data, but not ranges that contain locked cells |
| Use AutoFilter | Filter data |
| Use PivotTable reports | Work with PivotTable reports |
| Edit objects, Edit scenarios | Change objects and scenarios |
On a Mac, Microsoft names the filter option Filter rather than Use AutoFilter.
Lock only specific cells
- If the sheet is protected, go to Review > Unprotect Sheet and enter the password if asked.
- Click Select All.
- Open Format Cells with Ctrl+1 or Ctrl+Shift+F, go to the Protection tab, clear Locked, and click OK.
- Select only the cells you want to lock.
- Reopen Format Cells, go to the Protection tab, tick Locked, and click OK.
- Go to Review > Protect Sheet and choose what users may change.
This reverses the default, so only the cells you pick stay locked.
Let specific people edit a range
- Make sure the sheet is not protected, because Allow Edit Ranges is unavailable otherwise.
- Go to Review > Allow Edit Ranges.
- In the Allow Users to Edit Ranges box, click New.
- Enter a name in the Title box and the range in the Refers to cells box.
- Optionally, enter a Range password.
- Click Protect Sheet, choose the allowed elements, and set the unprotect password.
Microsoft says permission-based access needs Windows and a domain, and without a domain you should use a range password instead.
Hide formulas from the formula bar
Microsoft says you can hide formulas so they do not show in the cells or the formula bar.
Select the cells, open Format Cells, go to the Protection tab, and select Hidden, then protect the sheet.
On a Mac, the same Hidden option sits under Format > Cells > Protection.
Unprotect a sheet
- Go to the worksheet.
- Select Review > Unprotect Sheet, or File > Info > Protect > Unprotect Sheet.
- If a password is set, enter it and select OK.
Microsoft says the Protect Sheet button changes to Unprotect Sheet when a sheet is protected, which is the quickest way to check.
Password facts to know first
| Point | What Microsoft says |
|---|---|
| Optional | Without a password, anyone can unprotect the sheet |
| Lost password | Microsoft cannot retrieve it, and you may be unable to unprotect the sheet |
| Strength | Use at least 8 characters, and a passphrase of 14 or more is better |
| Mac limit | Passwords in Excel for Mac are limited to 15 characters |
A file protected on Windows with a longer password cannot be opened on a Mac until the author shortens it.
What sheet protection does not do
Microsoft says worksheet protection is not intended as a security feature, and it only prevents changes to locked cells.
It is not the same as encrypting a file, so for that see our guide to password protecting a Word or Excel file.
Protecting the workbook structure is separate, and stops users adding, moving, deleting, hiding or renaming worksheets.
Quirks that surprise people
- Users cannot apply or remove AutoFilters on a protected sheet if you did not allow it.
- If Delete columns is protected but Insert columns is not, users can insert columns they cannot delete.
- Buttons that run macros can still be selected to run them, but cannot be deleted.
- Conditional formats applied before protection keep updating when a value meets a different condition.
Microsoft also says worksheet protection is not available in U.S. Government Community Cloud High or Department of Defense environments.
Related Excel guides
If a workbook opens read-only because someone else has it, see fixing an Excel file locked for editing.
To keep column labels in view on a protected sheet, see how to freeze rows and columns in Excel.
If a protected sheet stalls, read fixing Excel not responding or freezing.
Sources
Microsoft Support: Protect a worksheet.
Microsoft Support: Lock cells to protect them in Excel.
Microsoft Support: Lock or unlock specific areas of a protected worksheet.
Microsoft Support: Protect a worksheet in Mac.
Microsoft Support: Protection and security in Excel.