To protect a worksheet in Microsoft Excel for Microsoft 365 on Windows, open the sheet and choose Review > Protect Sheet, select the actions people may still perform, and optionally enter a password. To keep specific cells editable, first select them, press Ctrl+1, open the Protection tab, clear Locked, and then protect the sheet.
What Excel sheet protection does
Worksheet protection is a way to prevent accidental or casual changes to cells and certain worksheet elements. It is useful for forms, templates, reports, and shared data-entry sheets where users should change only designated values. Protection does not make a worksheet impossible to change, and it is not a substitute for securing confidential information.
In a new Excel worksheet, cells are marked as locked by default. That setting does not stop editing until you turn on sheet protection. Once protection is on, the Locked setting determines which cells users cannot edit, while the permissions you choose determine which other actions remain available. For example, you can lock formulas and headings but leave input cells open for data entry.
Protection applies to an individual worksheet. A workbook can contain several sheets with different protection settings, and protecting one sheet does not automatically protect the others. It also does not prevent someone from opening the workbook or necessarily prevent them from copying information they can see.
Protect a worksheet step by step
- Open the worksheet you want to protect. If only some cells should be editable, unlock those cells before continuing.
- Choose Review > Protect Sheet.
- In the Protect Sheet dialog, leave Protect worksheet and contents of locked cells selected. Choose which actions users are allowed to perform, such as selecting unlocked cells or using an existing filter.
- Enter a password if you want Excel to require one to turn off protection. A password is optional; leaving it blank still enables protection but makes it easier for anyone to remove.
- Choose OK. If you entered a password, type it again when prompted and confirm.
Try the result before sharing the file. Click a cell that should be protected and attempt to edit it; Excel should display a warning. Then test an intended input cell and any permitted actions, such as filtering. This catches common setup mistakes, including forgetting to unlock the input cells or failing to allow an action a user needs.
Make only selected cells editable
Start by deciding which parts of the sheet users should change. For a simple expense template, you might leave the date, description, and amount entry cells open while protecting totals, labels, and calculation formulas. Select the cells users may edit; to select separate areas, hold Ctrl while selecting each area in Windows.
With the editable cells selected, press Ctrl+1 to open Format Cells, choose the Protection tab, clear the Locked check box, and click OK. Then protect the sheet using Review > Protect Sheet. Locked and unlocked are properties of cells, so the same selection can be configured before protection is switched on.
To check a cell’s setting later, select it and open Format Cells > Protection. The Hidden option on that tab is also relevant to formulas: when a cell is marked Hidden and the sheet is protected, its formula is not displayed in the formula bar. Hiding a formula is not encryption, however; it should not be treated as a secure way to conceal sensitive information.
If the whole sheet should be read-only, you normally do not need to change the default Locked setting. Protect the sheet directly. If you unlock a broad range by mistake, users may be able to alter more than the intended input area, so review the selected cells before enabling protection.
Choose the actions users are allowed to take
The Protect Sheet dialog combines cell editing restrictions with a checklist of permitted worksheet actions. The options can include selecting locked or unlocked cells, formatting cells, columns, or rows, inserting or deleting rows and columns, inserting hyperlinks, sorting, using AutoFilter, using PivotTable reports, and editing objects or scenarios. The exact set shown can depend on the Excel version and workbook content.
Choose permissions according to the task rather than enabling everything by default. For example, a sheet with a pre-existing filter may need the Use AutoFilter permission so a reviewer can change filter criteria without editing protected values. Allowing a user to select unlocked cells can make a form easier to use, while preventing selection of locked cells can reduce accidental clicks on formulas.
Some permissions do not override the underlying cell restrictions in every situation. In particular, sorting a protected range can be blocked if the range includes locked cells, even when sorting was allowed in the protection settings. If sorting is essential, test the actual range and layout with protection enabled. A worksheet’s existing AutoFilter is also different from permission to create a new filter; set up the filter before protection if users need to operate it.
Passwords and the limits of protection
A worksheet password is mainly a control against ordinary edits, not strong data security. Microsoft warns that worksheet protection is not intended as a security feature. Someone with access to the workbook may be able to work around sheet protection using other tools or methods, and protection does not conceal the sheet’s visible contents.
Use sheet protection to prevent accidental overwriting of formulas or to guide routine data entry. Do not rely on it to protect private, regulated, or commercially sensitive information from people who can access the file. Instead, control access to the workbook and its storage location, and use file-level encryption when appropriate.
Excel does not provide a way to recover a forgotten worksheet-protection password through the normal Unprotect Sheet command. Keep passwords in an approved password manager or another secure, accessible location. Avoid using a password that is so difficult to retain that the workbook owner may be locked out of routine maintenance. If protection is important, also keep an authorized unprotected source copy in a controlled location.
Remove protection and troubleshoot common problems
To remove protection in Excel for Microsoft 365 on Windows, open the protected sheet and choose Review > Unprotect Sheet. If a password was set, enter it when prompted. Removing protection lets you edit the cells and their Locked settings; it does not erase cell contents or formulas.
If Excel says a cell is protected when you expected it to be editable, check that the correct cells were unlocked before protection was applied. Unprotect the sheet, select the input cells, clear Locked under Format Cells > Protection, and protect the sheet again. If the entire worksheet is locked, the most likely cause is that the cells were never unlocked, not that Excel has ignored the setting.
If a collaborator cannot filter or sort, unprotect the sheet and review the allowed actions. Confirm that the filter was applied before protection and that the range can be sorted under the current locked-cell arrangement. If a password prompt appears unexpectedly, check whether another person protected the sheet or whether the workbook is a template with protection already enabled.
Protection is per worksheet, so repeat the process for each sheet that needs it. For a workbook with many tabs, test each tab separately and label the intended input areas clearly. A protected sheet can still be confusing if users cannot tell which cells are meant for entry.
Sheet protection compared with workbook protection
Protect Sheet and Protect Workbook solve different problems. Sheet protection governs editing actions and locked cells on the active worksheet. Workbook structure protection is used to restrict structural changes such as adding, deleting, moving, hiding, or renaming worksheet tabs. It does not make the cells on every sheet read-only.
For workbook structure, use Review > Protect Workbook and choose the structure-protection option when available. To restrict access to the file itself with a password, Excel for Windows provides File > Info > Protect Workbook > Encrypt with Password. This file-encryption option is distinct from a worksheet password; losing the encryption password can prevent the workbook from being opened. Store it securely and make a backup before changing access settings.
Choose the narrowest control that fits the purpose. A data-entry form may need one protected sheet with unlocked input cells. A workbook whose tabs must not be rearranged may also need structure protection. A workbook containing information that should not be readable by unauthorized people needs appropriate file and storage access controls, not just worksheet protection.
Excel for Mac and Excel for the web
On Excel for Mac, sheet protection is available from the Review tab, though dialog layouts and the exact presentation of options can differ from Windows. The Mac equivalent of Ctrl+1 for opening Format Cells is Command+1. Check the Protection tab there to unlock selected cells before turning on protection.
Excel for the web has worksheet-protection features, but its controls and available management options may not match the desktop dialog exactly. If you need a particular permission, such as a specific filter or formatting action, verify it in the web version your collaborators use. When a setting is missing or the behavior needs careful testing, open the workbook in the desktop app and configure protection there.
Frequently Asked Questions
How do I protect an Excel sheet without a password?
Choose Review > Protect Sheet and leave the password field blank. The sheet is protected against ordinary editing, but anyone who can access the workbook can remove the protection without entering a password.
How do I lock only certain cells in Excel?
Cells are locked by default. Unlock the cells users may edit through Format Cells > Protection, then protect the worksheet. The remaining locked cells are protected when sheet protection is active.
Can I protect formulas but allow data entry?
Yes. Leave formula cells locked, unlock the intended input cells, and turn on sheet protection. You can also mark formula cells Hidden before protection to keep formulas out of the formula bar, but that does not securely conceal them.
Why can’t I edit a protected Excel sheet?
The cell is probably locked while sheet protection is on. If you are authorized to change it, choose Review > Unprotect Sheet, enter the password if requested, and then edit or change the cell’s protection setting.
Does Protect Sheet stop someone from opening my Excel file?
No. Sheet protection restricts selected worksheet actions after the workbook is open. To restrict opening the workbook, use file encryption and control who can access the file; do not treat a sheet password as file security.
Related
- Excel Shortcut Keys for the Next Sheet in a Workbook
- Excel Named Range Data Validation List: Setup and Fixes
- Excel Named Range in a Drop-Down List: How to Set It Up
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Set Up Auto Forwarding in Microsoft OutlookTo automatically send incoming Outlook email to another address, open Settings > Mail > Forwarding in Outlook on…
- Excel Dynamic Title on Box Plot: Link It to a CellTo make an Excel box plot title dynamic, put the title text or a formula in a worksheet…
- How to Archive Outlook Emails to Your C Drive as a PSTTo archive Outlook emails on your C drive, use classic Outlook for Windows to export the mailbox or…
- Simple Wedding Budget Spreadsheet: Set It Up in ExcelCreate a simple wedding budget spreadsheet in Excel with columns for category, planned amount, actual amount, and remaining.…
- Excel Text to Columns: Split Pasted Data Into FieldsTo split pasted data in Excel, select the column containing the combined text, then choose Data > Text…
- Delete an Unused Page in Word: Causes and Easy FixesTo delete an unused page in Microsoft Word, show formatting marks with Ctrl+Shift+8, then remove the extra paragraph…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.