To password protect an Excel sheet from editing in Microsoft 365 for Windows, open the worksheet and select Review > Protect Sheet. Enter a password, choose what users may still do, confirm the password, and select OK. First unlock any cells people should be able to edit; sheet protection only takes effect on locked cells after you turn it on.
What Excel sheet protection does
Worksheet protection is a way to prevent accidental or casual changes to selected parts of a sheet. It lets you keep formulas, labels, and layout cells locked while leaving designated input cells available. For example, a shared expense form might let colleagues enter amounts in a few cells but prevent them from overwriting the formulas that calculate totals.
Excel cells are marked as locked by default, but that setting does not stop editing until the worksheet is protected. Once protection is enabled, Excel applies the locked status and the permissions you chose. This distinction matters: selecting Format Cells > Protection and clearing Locked does not itself protect anything or change the behavior of a sheet that is not protected.
Sheet protection is not the same as securing the file. A protected sheet can still be viewed, and the workbook’s contents may be copied. Protection is useful for controlling ordinary editing, not for keeping confidential information secret or defending valuable data against a determined person.
Protect a worksheet with a password
Use Excel desktop for Microsoft 365 on Windows for the following steps. Before protecting the sheet, decide whether it needs editable areas and set those up first.
- Open the worksheet you want to protect. Protection is applied to one worksheet at a time, so repeat these steps for each sheet that needs it.
- If users need to enter information in particular cells, select those cells and unlock them. The next section explains how.
- Select Review > Protect Sheet.
- In the Protect Sheet dialog, enter a password if you want users to need it to turn protection off. You can also protect a sheet without a password, but anyone who can access the sheet can then unprotect it without knowing one.
- Review the list of allowed actions. Leave checked only the actions users need, such as selecting unlocked cells or sorting.
- Select OK. If you entered a password, Excel asks you to enter it again to confirm.
- Test the result by trying to change a locked cell and an intended input cell. Confirm that users can carry out the permitted actions without altering protected content.
To remove protection later, select Review > Unprotect Sheet and enter the password if Excel prompts for it. Keep a secure record of the password somewhere separate from the workbook. A forgotten sheet-protection password can prevent you from changing the protection settings.
Leave specific cells editable
For a form or template, unlock only the cells where users should enter data, then protect the sheet. For example, suppose a budget template has labels in column A, formulas in column C, and blank entry cells in B2:B20. You can unlock B2:B20 and protect the sheet so that people can enter amounts without overwriting labels or calculations.
- Select the cells users should be able to edit. To select separate ranges, hold Ctrl while selecting each range on Windows.
- Open Format Cells with Ctrl+1, then select the Protection tab.
- Clear the Locked checkbox and select OK. On a Mac, Command+1 opens Format Cells; the dialog layout may differ slightly.
- Choose Review > Protect Sheet and set the desired password and permissions.
When the worksheet is protected, users can edit the unlocked cells and cannot edit locked cells under the selected settings. Avoid unlocking entire rows or columns unless that is genuinely intended: a broad unlocked range makes it easier for someone to change a cell you meant to preserve. If you have an existing worksheet, test a copy before applying protection to a complex layout.
Choose useful permissions
The Protect Sheet dialog includes permissions that determine what users can do while the sheet is protected. The exact available actions depend on the Excel version and workbook features. Common options include selecting locked or unlocked cells, formatting cells, inserting rows, deleting columns, sorting, and using AutoFilter.
Choose permissions based on the task, not simply on convenience. If users only need to fill out an input form, allowing selection of unlocked cells may be sufficient. If they must filter a protected table, permit use of AutoFilter. Test sorting and filtering with the actual workbook: protection settings can affect whether an action works, particularly when the range contains locked cells.
Allowing cell formatting, row insertion, or column deletion can weaken the layout controls you intend to apply. Conversely, blocking selection of locked cells can make a sheet easier to use when people should focus only on input fields. Consider adding clear labels or color to indicate editable cells, but do not rely on color alone; instructions can help prevent mistakes for users who cannot distinguish the colors.
Sheet protection, workbook protection, and file encryption
Excel has several kinds of protection with different purposes. Choosing the right one prevents a common misunderstanding: a password on a worksheet does not necessarily password-protect the workbook file.
- Protect Sheet: Restricts specified editing actions on one worksheet. Use it to protect formulas, cell contents, or layout from routine changes.
- Protect Workbook: Workbook structure protection can restrict actions such as adding, deleting, moving, hiding, or renaming sheets. In Excel for Windows, find it under Review > Protect Workbook. It does not make the workbook’s contents confidential.
- Encrypt the file with a password: This requires a password to open the workbook and is the relevant choice when the goal is to restrict access to the file’s contents. In Excel for Windows, use File > Info > Protect Workbook > Encrypt with Password.
These options can be used for different needs, but they are not interchangeable. A workbook can have a protected sheet while remaining open to anyone who has the file. If you need both controlled editing and restricted access, use the appropriate protections for each purpose and share the password only with intended recipients.
Limits and safety considerations
Microsoft describes worksheet protection as a way to prevent changes to locked cells, not as a security feature for sensitive information. It does not prevent someone from reading visible data, taking a screenshot, or making a copy of information they can access. Do not store private or regulated information in a workbook that is merely protected at the worksheet level.
File encryption is stronger for restricting access, but it makes password management especially important. If you lose the password used to encrypt a workbook, Microsoft cannot retrieve it for you. Keep an authorized copy of the password in a secure password manager or another approved location, and avoid sending the password in the same message as the encrypted file.
Sheet protection also does not replace sound access controls. If a workbook is stored in OneDrive or SharePoint, manage who can open or edit the file through the sharing permissions for that location. Those permissions control access to the file; worksheet protection controls certain actions within a sheet after someone has opened it.
Common problems and fixes
- Users can still edit cells: Check that sheet protection is on and that the cells in question are locked. Select a cell, open Format Cells > Protection, and inspect Locked. Remember that unlocking a cell is useful only when the sheet is protected and the user is allowed to edit unlocked cells.
- Users cannot enter data in the form: The input cells may still be locked, or the Protect Sheet settings may not allow selecting unlocked cells. Unprotect the sheet, correct the cell settings, and protect it again.
- A filter or sort command is unavailable: Review the permissions selected in Protect Sheet. Enable the relevant action if appropriate, then test it with the workbook’s actual data and protected ranges.
- The password does not work: Check capitalization, keyboard layout, and whether the correct password was saved. Excel passwords are case-sensitive. If you do not know the password, look for an authorized copy or ask the workbook’s owner; do not assume worksheet protection can be recovered like a normal file password.
- The web app does not show the setting you need: Excel for the web has different protection capabilities from desktop Excel. For password setup or management that is unavailable in the browser, open the workbook in the Excel desktop app and use Review > Protect Sheet.
Alternatives for shared workbooks
If several people need to contribute, protecting selected cells may be enough for a simple template. For a process with different roles or frequent updates, consider storing the data in a controlled list or service and giving users appropriate access there, rather than relying on one worksheet password. That can make ownership, permissions, and change tracking easier to manage.
You can also reduce accidental edits without a password by separating input cells from calculation areas, using clear labels, and keeping a clean master copy. Data validation can guide entries—for example, a dropdown can limit a field to approved choices—but it does not secure a sheet. A validation rule and sheet protection solve different problems: one guides what users enter, while the other restricts particular editing actions.
Before sharing a protected workbook, save a separate backup and test it as a typical recipient would use it. Confirm that all intended entry, filter, and navigation tasks work. If you are using file encryption, test that the recipient can open the file with the password, and share that password through an appropriate separate channel.
Frequently Asked Questions
Can I password-protect only certain cells in Excel?
Not directly with a separate password for each cell. Unlock the cells that should remain editable, leave the others locked, and protect the worksheet with a password. The password applies to unprotecting the sheet, while the Locked setting determines which cells are restricted.
Can someone view a sheet if it is protected?
Yes. Worksheet protection restricts specified editing actions; it does not hide the sheet’s contents from someone who can open the workbook. Use file encryption or controlled file-sharing permissions if you need to restrict access to the information.
Does protecting a sheet protect the whole workbook?
No. Protect Sheet applies to an individual worksheet. Use workbook structure protection to restrict changes such as renaming or deleting sheets, and use file encryption if a password should be required to open the workbook.
Can I protect a sheet in Excel for the web?
Excel for the web has a different set of protection controls from Excel desktop, and password management options may not be available there. Open the workbook in Excel for Windows or Mac when you need to set or manage worksheet password protection.
What happens if I forget the sheet password?
You may be unable to change or remove the worksheet protection settings. Check with the workbook’s owner or locate an authorized backup. Keep passwords in a secure place before protecting important files, and do not confuse a sheet password with the password used to encrypt a workbook for opening.
Related
- How to Partially Protect an Excel Sheet
- How to Print Just a Highlighted Area in Excel
- How to Merge Cells in Excel Without Losing Data Safely
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets IMPORTRANGE With Criteria: How to Filter DataGoogle Sheets’ IMPORTRANGE function does not have a built-in criteria argument; combine it with QUERY to import only…
- Excel Fill Color Shortcut: Apply Color QuicklyIn Excel for Microsoft 365 on Windows, select the cell or range, then press Alt, H, H in…
- How to Enter a Negative Number in Excel CorrectlyTo enter a negative number in Excel, select a cell, type a minus sign followed by the number,…
- Schedule an Email in Outlook: A Step-by-Step GuideTo schedule an outgoing email in Outlook, write your message, open the menu beside Send, choose Schedule send,…
- How to Paste in Excel Only Visible Cells Without Hidden RowsTo copy and paste only the cells you can see in Excel for Microsoft 365 on Windows, select…
- Delete a Blank Page in Word: A Simple Step-by-Step GuideTo delete a blank page in Word, show formatting marks with Ctrl+Shift+8 on Windows or Command+8 on Mac,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.