In Excel, Protect Sheet restricts what people can change on a worksheet, chiefly by preventing edits to cells marked as locked. To use it well, unlock the cells people should fill in first, then choose Review > Protect Sheet; you can add a password, but sheet protection is an editing control, not strong data security.
What Protect Sheet means
Excel gives each cell a Locked setting, found in the cell’s formatting options. In a new worksheet, cells are generally marked as locked by default. That setting does not stop anyone from editing them until you protect the sheet. Protection activates the setting: locked cells cannot be changed through normal worksheet editing, while unlocked cells remain available for entry.
This lets you protect a calculation or template without making the whole sheet unusable. For example, a monthly expense form might have labels and formulas in locked cells, with the amount and description fields unlocked. Once the sheet is protected, someone can enter an expense but is less likely to overwrite a total formula accidentally.
Protection applies to a worksheet, not automatically to every sheet in a workbook. If a workbook has several sheets, you can protect each one separately and choose different permissions. Sheet protection also does not mean that the workbook is read-only in every respect: users may still be able to select cells, copy information, or work with permitted features, depending on the options you choose.
How to protect a sheet while leaving input cells editable
For Microsoft 365 on Windows, prepare the cells before turning on protection. The key is to unlock the cells intended for editing; locking every cell and then protecting the sheet would block ordinary entry across the worksheet.
- Select the cells people should be able to edit. To select separate areas, hold Ctrl while selecting each area.
- Open Format Cells with Ctrl+1, choose the Protection tab, clear the Locked checkbox, and select OK. On Mac, use Command+1 to open Format Cells; the dialog and ribbon can vary somewhat by Excel release.
- Choose Review > Protect Sheet.
- In the dialog, leave the option to protect the worksheet and the contents of locked cells selected. Enter a password if you want one, then select which actions users may still perform.
- Select OK. If you supplied a password, Excel asks you to enter it again for confirmation.
After protection is on, test the worksheet as a user would. Try typing in an intended input cell, then try changing a formula or heading that should remain fixed. If the wrong cells are editable, unprotect the sheet, correct their Locked settings, and protect it again. On Mac, the Protect Sheet command is also on the Review tab, though the precise dialog layout may differ.
Choosing what users can still do
The Protect Sheet dialog is not simply an all-or-nothing switch. It offers permissions for actions such as selecting locked or unlocked cells, formatting cells, rows, or columns, inserting or deleting rows and columns, sorting, and using AutoFilter. The exact options available depend on the Excel version and context. Allow only the actions needed for the worksheet’s purpose; each extra permission creates another way the sheet’s layout or data might change.
For a basic form, allowing selection of unlocked cells while preventing selection of locked cells can make navigation clearer. A user can move among the fields they are meant to complete without landing on protected formulas. For a reporting sheet, you might allow users to sort or use an existing filter while keeping the underlying cells protected.
Some permissions have practical limits. To let users use AutoFilter on a protected sheet, set up the filter before protecting the sheet and allow the AutoFilter option. Sorting a protected range can also be restricted if the cells involved are locked. Test the exact workflow with a copy of the sheet, particularly when the range includes formulas, merged cells, or a table.
What happens to formulas and formatting
Protection is useful for keeping formulas from being overwritten during routine use. A formula cell marked Locked cannot normally be edited while the sheet is protected, but the formula still calculates and its displayed result remains visible. Locking does not hide the formula from someone who can view it in the formula bar.
If you want a formula to be hidden from the formula bar as well, select its cell, open Format Cells > Protection, and select Hidden before protecting the worksheet. The Hidden setting takes effect only when the sheet is protected. It is a convenience for a controlled template, not a way to keep confidential logic secret: worksheet protection is not encryption.
Formatting is a separate permission from editing cell contents. A user may be blocked from changing a locked cell’s value yet still be allowed to change its format if you permit formatting in the protection dialog. Conversely, you can leave cells editable while preventing users from changing row heights, column widths, or cell appearance. Consider which changes would disrupt the worksheet and configure those options accordingly.
Protection versus workbook and file passwords
Excel has several protections with similar names that solve different problems. Protect Sheet governs permitted changes to one worksheet. Protect Workbook, available from Review > Protect Workbook, can restrict structural changes such as adding, deleting, moving, hiding, or renaming sheets. It does not replace protection settings on individual sheets.
A password required to open an encrypted workbook is different again. In Microsoft 365 for Windows, file encryption is available through File > Info > Protect Workbook > Encrypt with Password. Encryption is intended to prevent access to the file without the password; Protect Sheet is not. If sensitive information must be restricted, use appropriate file access controls and encryption rather than relying on worksheet protection alone.
A worksheet password is optional. Without one, a person can normally turn off protection through Review > Unprotect Sheet. With one, Excel asks for the password to unprotect the sheet. This discourages casual or accidental edits, but Microsoft describes worksheet protection as a feature to prevent modification of locked cells, not as a security feature. Do not use it as the sole safeguard for confidential data.
Allowing edits to selected ranges
For a more complex worksheet, Excel for Windows includes an Allow Edit Ranges command on the Review tab. It can be useful when most of a sheet should stay protected but particular ranges need separate editing arrangements. Depending on the setup, a range can be associated with a password or permissions in a managed Windows environment. After defining ranges, protect the worksheet so the restrictions take effect.
This can help with a shared planning sheet where different sections belong to different contributors, but it should not be mistaken for a complete identity or access-management system. A range password is shared by everyone who uses it, and availability or behavior can differ across platforms. For ordinary templates, unlocking input cells and protecting the sheet is usually easier to maintain.
Common problems and how to fix them
- I cannot type anywhere. The cells may still be locked. Unprotect the sheet, select the intended input cells, clear Locked in Format Cells > Protection, and protect the sheet again.
- I can still edit a cell after protection. Check whether the cell was unlocked before protection, or whether the sheet is actually protected. Cell locking alone does not block edits.
- I cannot sort or filter. Review the allowed actions in Protect Sheet. AutoFilter generally needs to exist before protection is enabled, and sorting may require the relevant cells to be unlocked.
- I cannot change a column width or format. Protection may be working as intended. Unprotect the sheet to make the change, or allow the necessary formatting action when you protect it again.
- I forgot the password. Excel does not offer a normal password-recovery workflow for worksheet protection. Keep passwords somewhere secure and accessible to the people responsible for the workbook; do not assume that a protected sheet can be recovered like an ordinary forgotten account password.
When revising a protected template, keep an unprotected master copy in a controlled location. That gives its owner a clean version for changing formulas, layouts, or permissions without asking users to work around protection. It also helps distinguish a deliberate protection setting from a damaged or incorrectly configured worksheet.
Frequently Asked Questions
Does Protect Sheet stop people from viewing the worksheet?
No. It limits specified changes to the worksheet; it does not hide the sheet’s contents or encrypt the workbook. Use file-level access controls and encryption when viewing the data itself must be restricted.
Do I have to set a password to protect a sheet?
No. You can protect a sheet without a password, which helps prevent accidental edits but lets someone unprotect it through Excel’s normal command. A password adds a barrier to turning protection off, not strong confidentiality.
Why are cells locked by default if I can still edit them?
The Locked setting is a property of the cells, not an active restriction by itself. It only blocks normal editing after you turn on Protect Sheet. That design lets you choose editable input cells before applying protection to the worksheet.
Can I protect only some cells?
Yes. Unlock the cells that should remain editable and leave the others locked, then protect the sheet. You can also use Allow Edit Ranges for specific range-based arrangements in supported Excel environments.
Can users copy data from a protected sheet?
Protection is not designed to prevent copying or disclosure of worksheet contents. The actions permitted can affect what users can select, but sheet protection should not be treated as a barrier to extracting information from a workbook.
Related
- Excel Slicer Search Box: How to Find Items
- Excel Slicer Examples for PivotTables and Tables Explained
- Excel Slicer Font Size: What You Can and Can’t Change
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Add a Shared Mailbox in Outlook App: Setup StepsTo add a shared mailbox in Outlook, first ask your Microsoft 365 or Exchange administrator to grant your…
- Cover Page in Microsoft Word: Add and Customize OneTo add a cover page in Microsoft Word for Microsoft 365 on Windows, open the document and choose…
- Ctrl+E in Excel: Flash Fill Shortcut and How It WorksIn Excel for Microsoft 365 on Windows, Ctrl+E runs Flash Fill: it detects a pattern in your examples…
- Add Page Numbers in Word on Mac: Step-by-Step GuideTo add page numbers in Word on a Mac, open the Insert tab, choose Page Number, select where…
- How to Create a Signature Footer in Outlook for EmailTo create a signature footer in Outlook, open the signature settings for your version of Outlook, create and…
- Find and Replace Numbers in Excel: A Practical GuideTo find and replace numbers in Excel for Microsoft 365 on Windows, press Ctrl+H, enter the number in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.