To protect a worksheet in Excel for Microsoft 365 on Windows, open the sheet, select Review > Protect Sheet, choose what users may still do, optionally enter a password, and select OK. To let people edit only certain cells, unlock those cells before you turn on sheet protection.
What protecting an Excel sheet does
Worksheet protection is a way to limit changes to a sheet’s contents and layout. It is useful when a workbook contains formulas, labels, or a carefully arranged form that other people need to use without accidentally changing its design. For example, a monthly expense sheet might let users enter amounts in designated cells while preventing edits to the totals and headings.
Protection is applied to a worksheet, not automatically to every sheet in the workbook. If a workbook has separate tabs for January, February, and March, protecting January does not protect the other two. You can protect each sheet individually, and you can choose different permissions for each one.
A key detail is that cells are marked as locked by default, but that setting has no effect until sheet protection is turned on. You can therefore decide which cells should remain editable first, then protect the sheet to enforce that choice.
How to protect a worksheet
In desktop Excel for Windows, use these steps:
- Open the worksheet you want to protect.
- On the ribbon, select Review > Protect Sheet.
- In the dialog, leave Protect worksheet and contents of locked cells selected.
- Choose the actions users are allowed to perform, such as selecting unlocked cells or sorting data.
- Enter a password if you want Excel to require one to remove protection. You can leave the password blank if your goal is only to prevent casual edits.
- Select OK. If you entered a password, type it again when prompted and confirm.
Try the protected sheet yourself before sharing it. Click a cell that should be restricted and confirm Excel prevents the edit; then check that the intended input cells still accept changes. If you set a password, store it somewhere you can retrieve later. Excel does not provide a reliable way to recover a forgotten worksheet-protection password.
Let users edit selected cells
To make a worksheet form usable, unlock its input cells before protecting the sheet. Select the cells users should be able to change. For separate ranges, hold Ctrl while selecting additional ranges in Windows. Open Home > Format > Format Cells, select the Protection tab, clear Locked, and choose OK. You can also select cells and press Ctrl+1 to open Format Cells. On a Mac, use Command+1 for the Format Cells dialog.
After you protect the sheet, the unlocked cells remain editable and the locked cells are restricted according to the permissions you selected. For instance, a simple order form might have product names and prices in locked cells, with quantity cells unlocked. The user can enter quantities while the formula cells that calculate totals remain protected.
Be deliberate about the selection. If you unlock an entire column to make one input area convenient, users may be able to change more cells than intended. You can also use Review > Allow Edit Ranges in desktop Excel to define ranges that may be edited under specified conditions; this feature can involve permissions or passwords and is more than most simple forms need. Test the workbook with the same kind of access the recipient will have.
To hide formulas as well as prevent changes to them, select the formula cells, open Format Cells, and on the Protection tab select Hidden as well as leaving Locked selected. Then protect the worksheet. The formula is hidden from the formula bar while the sheet is protected; hiding it is not encryption and does not make the workbook’s contents secret.
Choose permitted actions carefully
The Protect Sheet dialog includes a list of actions users may perform while protection is active. The available choices can depend on the Excel version, but commonly include selecting locked or unlocked cells, formatting cells or columns, inserting rows, sorting, and using AutoFilter. Selecting an option grants that action; it does not unlock every cell involved.
For a data-entry form, allowing selection of unlocked cells while disallowing selection of locked cells can make it easier to move through the intended inputs. For a protected list, sorting or filtering may be useful, but check the result with your actual table setup. If a person needs to change the sheet’s structure or edit protected formulas, the appropriate solution may be to revise the protection settings rather than enable unrelated permissions.
These settings are not a substitute for a carefully designed workbook. A permission to format cells, for example, can let a user change appearance without authorizing edits to locked values. Conversely, unlocked cells remain editable even if the sheet is protected. Review the specific checkboxes rather than assuming that protection simply switches all editing off.
Worksheet protection, workbook protection, and encryption
Excel has several different protections with similar names. Protect Sheet restricts actions on the current worksheet. Protect Workbook can restrict changes to workbook structure, such as adding, deleting, moving, or renaming sheets. It does not by itself lock the contents of every worksheet. If you need both protections, configure them separately.
Workbook structure protection is available from Review > Protect Workbook in desktop Excel. Depending on the dialog and version, Excel may let you protect the structure with a password. This is useful when recipients should use existing tabs but should not rearrange or remove them. It does not stop someone from editing unlocked cells or cells on an unprotected worksheet.
Encryption is a separate matter. To require a password to open a file in desktop Excel, use File > Info > Protect Workbook > Encrypt with Password. That protects access to the workbook file, rather than merely restricting edits after it is open. Keep the opening password safe: if it is lost, Microsoft cannot retrieve it for you. Choose the protection that fits the goal instead of treating sheet protection, structure protection, and file encryption as interchangeable.
How strong is a sheet-protection password?
Worksheet protection is mainly intended to prevent accidental or routine changes, not to provide strong security for sensitive information. It can help preserve formulas and layout in a shared workbook, but it should not be used as a confidentiality measure. A person who can open the file may still be able to copy information from it, and worksheet protection is not the same as encrypting the file.
If confidential data must be restricted, do not rely on hiding a sheet, hiding formulas, or protecting a worksheet. Limit access to the file using appropriate storage and sharing permissions, and use workbook encryption when a password to open the file is appropriate. Consider whether recipients need the sensitive data at all; removing unnecessary information is safer than trying to conceal it inside a workbook.
Passwords for sheet protection are also easy to lose track of because Excel does not offer a password-recovery service for them. Keep an authorized copy of the password in a secure place and document who is responsible for the workbook. If the protection is only meant to prevent accidental edits, leaving the password blank may make maintenance simpler, though it offers less resistance to deliberate changes.
Remove protection and solve common problems
To remove protection in desktop Excel, open the protected sheet and select Review > Unprotect Sheet. If Excel asks for a password, enter the one used when protection was applied. Removing sheet protection does not delete the worksheet or its data; it lifts the restrictions so the sheet can be edited normally.
- A cell will not accept edits: The sheet may be protected and the cell may still be marked Locked. Unprotect the sheet, unlock the cell through Format Cells > Protection, and protect the sheet again.
- Users can edit more than expected: Check for a large unlocked range, an allowed editing range, or a worksheet that was never protected. Review the settings on each relevant sheet.
- Sorting or filtering is unavailable: Unprotect the sheet, adjust the allowed actions in Protect Sheet, and protect it again. Also verify that the data range and filter are set up as intended.
- The password is rejected: Check capitalization, keyboard layout, and whether you are using the worksheet password rather than a password to open the workbook. Excel cannot tell you a forgotten password.
- Only one tab is protected: Sheet protection applies separately to each worksheet. Repeat the process on the other tabs that need restrictions.
If you inherited a protected workbook and do not know its password, contact the file’s owner or whoever manages it. If you are the owner, look for a documented password or an authorized unprotected copy. Avoid relying on protection as a recovery mechanism: keep a separate backup before making significant structural or security changes.
Excel for Mac and Excel for the web
In Excel for Mac, sheet protection is also found on the Review tab, though the ribbon layout and dialog wording can differ from Windows. Look for Protect Sheet and follow the prompts. To change a cell’s Locked or Hidden setting, open Format Cells with Command+1 on Mac; the Windows shortcut is Ctrl+1. Menu layout and available permissions can vary by release.
Excel for the web also includes worksheet-protection controls under the Review tab, but its interface and available settings may not match desktop Excel exactly. If you cannot find a particular permission or need more complete control over protection, open the workbook in the desktop application. Be aware that a workbook’s protection settings and behavior can depend on the features supported by the version used by each collaborator.
Frequently Asked Questions
Does protecting a sheet protect the whole Excel file?
No. It restricts selected actions on one worksheet. Protect other sheets individually, protect workbook structure if needed, and use file encryption when you need a password to open the workbook.
Why can I still edit some cells after protecting the sheet?
Those cells may have been set to unlocked before protection was enabled. Sheet protection applies to locked cells; it does not make every cell read-only automatically.
Can I protect a sheet without a password?
Yes. Leave the password field blank when you select Protect Sheet. The sheet will still enforce the selected restrictions, but removing protection will not require a password.
Can I protect only certain cells?
Excel’s usual approach is to leave the cells you want people to edit unlocked, then protect the worksheet. Locked cells are restricted when protection is on; unlocked cells remain available for input.
What if I forget the sheet-protection password?
Excel does not provide a way to recover a forgotten worksheet password. Ask the workbook owner or check secure records for the password or an authorized unprotected copy. Do not assume that protecting a sheet creates a recoverable backup.
Related
- Excel Named Ranges in Data Validation: How to Use Them
- Excel Unable to Remove Duplicates? Common Causes and Fixes
- Excel Text to Columns: How to Undo and Restore Data
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Group/Ungroup Shortcut: Keys, Steps, and FixesIn Excel for Microsoft 365 on Windows, select the rows or columns and press Alt+Shift+Right Arrow to group…
- How to Add a Shared Mailbox Folder in Outlook 365To add a shared mailbox folder in Outlook, first get permission to the mailbox or folder, then add…
- Excel Horizontal Page Breaks: Insert, Move, and RemoveAn Excel horizontal page break controls where one printed page ends and the next begins as you move…
- Excel To-Do List: How to Make OneTo make an Excel to-do list, create columns for the task, due date, priority, and completion status, then…
- Create a Vertical Line in an Outlook Email SignatureTo create a vertical line in an Outlook signature, use a two-column table and show only the border…
- Excel Print Header on Each Page: Repeat Rows in PrintTo print a worksheet’s column headings on every page in Excel for Microsoft 365 on Windows, go to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.