On this page · 12 sections
- Lock cells, protect a sheet or protect a workbook: which do you need?
- Worked example: an order form where only quantities can change
- How to lock specific cells in Excel for Windows
- Choose what people can still do on a protected sheet
- How to lock cells in Excel for Mac
- How to protect a sheet in Excel for the web
- How to lock formula cells and hide the formulas
- Let named people edit ranges (Windows)
- Troubleshooting
- For IT teams and businesses
- How eCorpIT can help
- References
Summary. To lock cells in Excel, leave Locked ticked on the cells to protect, clear it on the cells people should still edit, then select Review > Protect Sheet. Every cell starts out Locked, but the setting has no effect until the sheet is protected. Press Ctrl+1 on Windows or Cmd+1 on a Mac to open Format Cells and use its Protection tab. To hide formulas as well, tick Hidden before protecting. The password is optional; without one, anyone can unprotect the sheet, and Excel for Mac caps passwords at 15 characters. Microsoft recommends 8 or more characters and cannot retrieve a forgotten password. In Excel for the web, select Review > Manage Protection, turn on Protect sheet and add Unlocked ranges in the same pane. Microsoft says worksheet protection is not a security feature; it only blocks changes to locked cells. The steps match Microsoft's help for Excel for Microsoft 365 (Current Channel Version 2610, Build 20527.20196, released 10 November 2026), Excel 2024, Excel for Mac and Excel for the web.
About this article. For anyone who shares Excel workbooks and wants to stop accidental edits. We checked every step, label, shortcut and limit against Microsoft Support's Excel help and Microsoft Learn's update history and lifecycle pages on 15 November 2026. Labels can differ slightly between versions; this is not advice on securing sensitive data. Researched with AI assistance and reviewed by our editorial team.
Lock cells, protect a sheet or protect a workbook: which do you need?
Microsoft groups Excel protection into three levels: file (who can open or change the file), workbook (the structure of sheets) and worksheet (what people can do inside one sheet). Locking cells is worksheet protection.
| What you want to stop | Feature | Where to find it |
|---|---|---|
| Edits to some cells on a sheet | Locked cells plus Protect Sheet | Format Cells > Protection, then Review > Protect Sheet |
| People seeing formulas in the formula bar | Hidden cells plus Protect Sheet | Format Cells > Protection > Hidden |
| Adding, moving, deleting, hiding or renaming sheets | Protect Workbook (structure) | Review > Protect Workbook |
| Opening the file at all | Encrypt with Password | File > Info > Protect Workbook |
The workbook and file rows follow Microsoft's pages on those features. Freeze Panes and hidden columns are not protection: see our guide to freezing rows and columns and how to hide and unhide columns.
Worked example: an order form where only quantities can change
You send a price sheet to branch managers. They should type quantities in column B and nothing else.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Item | Qty | Unit price | Line total |
| 2 | Paper, box | 3 | 24.00 | 72.00 |
| 3 | Toner | 2 | 89.50 | 179.00 |
| 4 | Labels | 5 | 12.25 | 61.25 |
| 5 | Total | 312.25 |
D2 to D4 hold =B2*C2, =B3*C3 and =B4*C4; D5 holds =SUM(D2:D4), so the total is 72.00 + 179.00 + 61.25 = 312.25.
- Select B2:B4, press Ctrl+1, open the Protection tab, clear Locked and select OK.
- Select D2:D5, press Ctrl+1, keep Locked ticked, tick Hidden and select OK.
- Select Review > Protect Sheet, leave the default options, type a password, select OK and retype it to confirm.
Managers can now change quantities and the totals update, but Excel refuses edits to item names, prices and formulas, and the formula bar stays empty when they select a total. Tab moves between the unlocked quantity cells. Columns A and C stay locked because every cell is Locked by default. To limit quantities to set values, add a drop-down list to the input cells before protecting.
How to lock specific cells in Excel for Windows
The quick route works on a new sheet, because every cell is already Locked:
- Select the cells people should be able to edit. Hold Ctrl while clicking to add cells that are not next to each other.
- Press Ctrl+1 (or right-click and select Format Cells), open the Protection tab and clear Locked.
- Select Review > Protect Sheet.
If you inherited a sheet and are not sure what is set, reset it first:
- If the sheet is protected, select Review > Unprotect Sheet and enter the password if asked.
- Select the whole sheet with the Select All button.
- Press Ctrl+1 or Ctrl+Shift+F, open Protection, clear Locked and select OK. No cell is now locked.
- Select only the cells you want to lock.
- Open Format Cells again, tick Locked and select OK.
- Select Review > Protect Sheet.
- Under Allow all users of this worksheet to, tick what people may still do.
- Optionally type a password in Password to unprotect sheet, select OK, and retype it to confirm.
The ribbon button changes from Protect Sheet to Unprotect Sheet once the sheet is protected. To remove protection later, use that button or File > Info > Protect > Unprotect Sheet.
Choose what people can still do on a protected sheet
By default people may select locked and unlocked cells; tick anything else to allow in the Protect Sheet dialog. Microsoft's main Windows options, which the Mac and web lists closely follow:
| Option | What it allows | Worth knowing |
|---|---|---|
| Format cells | Changing options in the Format Cells and Conditional Formatting dialogs | Paste now honours this setting, unlike older versions |
| Format columns, Format rows | Changing column width or row height | It also lets people hide columns or rows |
| Insert columns, Insert rows | Adding columns or rows | If Delete is protected but Insert is not, people can add columns or rows they cannot remove |
| Sort | Sorting data | Ranges that contain locked cells cannot be sorted, whatever you tick |
| Use AutoFilter | Changing filters already applied | Nobody can apply or remove AutoFilter on a protected sheet |
| Edit objects | Changing charts, shapes and notes | Charts still update when their source data changes |
How to lock cells in Excel for Mac
Microsoft's Mac steps apply to Excel for Microsoft 365 for Mac, Excel 2024 for Mac and Excel 2021 for Mac. The current Mac release is Version 16.115, dated 10 November 2026.
- Select the cells people should edit. Press Cmd+1 (or choose Format > Cells), open Protection and clear Locked.
- Select Review > Protect Sheet.
- In Allow users of this sheet to, tick the actions to permit. The Mac list shows Filter where Windows shows Use AutoFilter.
- Optionally enter a password and retype it under Verify, then select OK.
Microsoft warns that a workbook protected in Windows Excel with a password longer than 15 characters cannot be opened in Excel for Mac, so ask the Windows author to shorten it. To remove protection, select Review > Unprotect Sheet.
How to protect a sheet in Excel for the web
Excel for the web uses a task pane instead of the Format Cells dialog.
- Select Review > Manage Protection.
- Turn on Protect sheet. By default the entire sheet is now locked and protected.
- To let people edit specific areas, select Unlocked ranges, enter a range name and cell range, and add more ranges if needed. Each range can have its own Range password.
- Optionally set a Sheet protection password, which is then needed to change protection for the whole sheet.
- Open the Options section to allow actions such as Format columns, Insert rows or Sort. These apply only while Protect sheet is on.
The web app adds Review > Pause Protection, which turns protection off for your session only; other people still see a protected sheet. A password-protected sheet needs the password to pause. Select Review > Resume Protection when done. The sheet tab shows a locked icon when protected and an unlocked icon when paused.
One limit: the web Format cells option covers only the Font and Alignment groups on the Home tab, and settings protected through the desktop Format Cells dialog can be changed only in Excel for Windows.
How to lock formula cells and hide the formulas
- Press Ctrl+Grave accent or select Formulas > Show Formulas to see which cells hold formulas.
- Select the formula cells.
- Select Home > Format > Format Cells, open Protection, and tick Locked and Hidden.
- Select Review > Protect Sheet, make sure Protect worksheet and contents of locked cells is ticked, and select OK.
The formulas still calculate and show results, but the formula bar stays empty and the cells cannot be edited. To show the formulas again, unprotect the sheet and clear Hidden.
Let named people edit ranges (Windows)
To open parts of a protected sheet to named users or to anyone with a range password, start with the sheet unprotected and select Review > Allow Edit Ranges, then New. Type a name in Title, enter an equals sign followed by the range in Refers to cells, and optionally add a Range password. Per-user Permissions need a computer joined to a domain; a range password works without one. Finish by selecting Protect Sheet in the same dialog. If a cell belongs to several ranges, anyone allowed to edit any of them can edit it.
Troubleshooting
- People can still edit locked cells. The sheet is not protected. Select Review > Protect Sheet.
- Nobody can edit anything. Every cell was still Locked. Unprotect, clear Locked on the input cells, and protect again.
- Unprotect Sheet is unavailable. Microsoft says to turn off the Shared Workbook feature first.
- Sorting or filtering fails. Protected sheets block sorting ranges with locked cells, and applying or removing AutoFilter, whatever you ticked.
- You forgot the password. Microsoft cannot retrieve it. Ask the person who protected the sheet, or use a copy saved before protection was added. We do not cover password-removal tools.
For IT teams and businesses
Use sheet protection to prevent accidental edits in budgets, timesheets and order forms, not to keep data confidential. For confidentiality, Microsoft points to file-level options: encryption, separate passwords to open and to modify, and Information Rights Management where your organisation has it. Worksheet protection is not available in the US Government Community Cloud High (GCCH) or Department of Defense (DoD) environments.
Excel 2016 and Excel 2019 reached end of support on 14 October 2025, and Excel 2021 retired on 13 October 2026. The steps still work there, but without security updates.
How eCorpIT can help
eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our data and analytics services team moves business-critical spreadsheets into governed reporting systems, so access is enforced by the platform rather than by sheet passwords. Talk to us at /contact-us/.
Last updated: 15 November 2026.