Excel Workbook Protection: What It Does and How to Use It

How-to basics · Updated November 18, 2026

Excel workbook protection is a set of separate controls, not one all-purpose security switch. In Microsoft 365 for Windows, use Review > Protect Sheet to restrict changes to a worksheet, Review > Protect Workbook to restrict changes to workbook structure, and File > Info > Protect Workbook > Encrypt with Password to require a password to open the file.

What Excel protection means

The phrase “workbook protection” can refer to three different things: protecting cells on a sheet, protecting the arrangement of sheets, or encrypting the file so it cannot be opened without a password. These controls solve different problems, and applying one does not automatically apply the others.

  • Worksheet protection limits actions such as editing locked cells, formatting cells, or inserting rows on a particular sheet.
  • Workbook-structure protection limits changes to the workbook’s sheet layout, such as adding, deleting, renaming, moving, hiding, or unhiding sheets.
  • File encryption protects access to the workbook itself by requiring a password to open it.

For example, a budget template might have formulas users should not overwrite, so its formula cells can be locked and the sheet protected. If the workbook also contains several linked tabs that should not be rearranged, protect its structure too. If the file contains confidential information, these editing restrictions are not a substitute for encryption and secure file-sharing permissions.

Protect a worksheet while allowing selected edits

Worksheet protection is useful when people should be able to enter information in designated cells but should not casually change formulas, labels, or layout. In Excel, cells are marked as locked by default, but that setting does not restrict editing until you protect the sheet. This is why selecting input cells and unlocking them is usually part of the setup.

  1. Select the cells users are meant to edit. To select separate ranges, hold Ctrl while selecting on Windows; on Mac, hold Command.
  2. Open Format Cells with Ctrl+1 on Windows or Command+1 on Mac. On the Protection tab, clear the Locked checkbox, then select OK.
  3. Go to Review > Protect Sheet. Choose which actions users may perform while the sheet is protected, and optionally enter a password.
  4. Select OK. If you set a password, confirm it when Excel asks.

For instance, in an expense form, you might unlock the cells for date, description, and amount while leaving the totals and formulas locked. You can also choose whether users may sort, use AutoFilter, format cells, or insert rows. The available actions are shown in the Protect Sheet dialog; allow only the actions the form actually needs.

To protect a sheet without a password, leave the password field blank and confirm the protection. This still prevents ordinary editing through Excel’s interface, but it is a convenience barrier, not strong security. A password adds a prompt for removing the restriction; it does not turn sheet protection into file encryption.

Protect workbook structure

Structure protection is for keeping the workbook’s collection of sheets intact. In Microsoft 365 for Windows, choose Review > Protect Workbook, select Structure in the dialog if it is not already selected, and optionally set a password. The control prevents actions such as adding, deleting, renaming, moving, hiding, or unhiding worksheets. The exact dialog wording can vary slightly by Excel build.

This is different from protecting the cells on a sheet. A workbook can have protected structure while its cells remain editable, or it can have protected sheets while users are still able to add or rename tabs. If both types of change matter, configure both protections. Structure protection also does not conceal the contents of a visible sheet or prevent someone from copying information they can access.

To remove structure protection, return to Review > Protect Workbook and provide the password if Excel requests it. If the workbook is shared with colleagues, make sure the owner or an authorized maintainer can update the sheet layout when required.

Encrypt a workbook with a password to open it

When the goal is to require a password before anyone can read the workbook, use file encryption. In Microsoft 365 for Windows, go to File > Info > Protect Workbook > Encrypt with Password, enter a password, and confirm it. Save the workbook so the encrypted setting is applied. The password is case-sensitive.

Encryption is the relevant choice for restricting access to workbook contents, rather than merely preventing edits in Excel. If you forget the password, Microsoft cannot retrieve it for you; keep it in an approved password manager or another secure location. Before distributing an encrypted file, arrange a separate, secure way to communicate its password. Do not put the password in the same email or message as the attachment.

To remove the password, open the file with the existing password, return to Encrypt with Password, delete the password from the field, select OK, and save the workbook. On Mac, protection and encryption controls are available in desktop Excel, but labels and menu placement may differ by version. Excel for the web has limitations for managing password encryption; use desktop Excel for these steps. A password-encrypted file may not open directly in the web app.

Protection versus sharing permissions

Worksheet and structure protection govern actions inside the workbook; they are not a replacement for controlling who can access the file. If a workbook is stored in OneDrive or SharePoint, use the service’s sharing settings to decide who can view or edit it. Those permissions control access to the file at the storage level, while sheet protection can help prevent accidental changes after an authorized person opens it.

For a shared planning workbook, for example, you might give a team edit access, unlock only the cells where team members enter updates, and protect formulas and headings. That arrangement reduces accidental damage, but it does not create reliable, individual cell-level permissions or prove which person may edit a particular cell. If people should not see certain information at all, do not rely on hiding a sheet or locking cells; restrict access to a separate file or use appropriate access controls.

When several people edit a workbook together, test the intended workflow with the actual sharing method and Excel versions in use. Protection can restrict some actions that collaborators need, and sharing or coauthoring behavior can differ from editing a local copy. Keep a controlled master copy and consider version history where the file is stored in a service that supports it.

Which protection should you choose?

Start with the consequence you are trying to prevent. The right setting depends on whether the issue is accidental edits, unwanted structural changes, or unauthorized access to the file.

  • Prevent formula edits: unlock input cells, leave formula cells locked, and protect the relevant sheet.
  • Keep sheet tabs from changing: protect workbook structure.
  • Require a password before the workbook can be read: encrypt the file with a password to open.
  • Limit access by person: configure sharing permissions in OneDrive, SharePoint, or the storage location, rather than treating a sheet password as an identity system.
  • Reduce accidental edits without a password: protect a sheet without setting one, understanding that this is not a confidentiality safeguard.

These protections can be combined, but more controls are not automatically better. A workbook may become difficult to maintain if nobody knows who owns its passwords or which cells should remain editable. Document the purpose of each protection and give an authorized maintainer a safe way to update the file.

Changing or removing protection

For a protected worksheet, use Review > Unprotect Sheet. Excel will ask for the password if one was set. After unprotecting it, you can change cell lock settings, edit restricted content, or adjust the allowed actions, then protect the sheet again if appropriate. Workbook-structure protection is toggled from Review > Protect Workbook; a password may be required to turn it off.

If a password prompt appears unexpectedly, check whether the file is encrypted to open, whether a particular sheet is protected, or whether workbook structure is protected. These are distinct prompts and require the corresponding password or permission. If you are authorized but do not know the password, contact the workbook owner or your organization’s administrator and check for an approved unprotected copy or backup. Do not assume that renaming the file or changing its extension removes protection.

Before changing a business-critical workbook, save a separate copy. Then verify the formulas, input cells, sheet tabs, and shared-access behavior after the change. This simple check can catch issues such as accidentally leaving an input range locked or removing a restriction that other users rely on.

Limits and common misconceptions

The most important misconception is that Protect Sheet makes data confidential. It does not. Sheet protection is intended to limit editing in Excel, not to stop a determined person from extracting data or to provide strong access control. Hiding a worksheet is also not the same as encrypting it: hidden content may still be accessible to someone who can change workbook settings or use other tools.

Another common issue is protecting a sheet before unlocking the cells that need input. When that happens, users cannot enter data in those cells. Unprotect the sheet, clear Locked for the intended input cells in Format Cells, and protect it again. If users need to filter or sort, revisit the allowed actions in the Protect Sheet dialog rather than assuming all normal worksheet operations remain available.

Passwords also create an operational risk: a forgotten password can block legitimate updates or access. Keep recovery and ownership procedures separate from the workbook itself, and do not place sensitive passwords in visible cells or comments. For confidential data, use file encryption and suitable storage permissions; for collaborative work, make sure those controls fit the organization’s sharing and backup practices.

Frequently Asked Questions

Does protecting a worksheet protect the whole Excel file?

No. It restricts selected actions on that worksheet, but does not necessarily protect other sheets, prevent the file from being opened, or secure a copy of the data. Use structure protection and file encryption when those are the specific needs.

Can I protect only some cells in Excel?

Yes. Unlock the cells that users should edit, then protect the sheet. Cells left locked are restricted while sheet protection is on. The default Locked setting alone has no effect until the sheet is protected.

What is the difference between a sheet password and an open password?

A sheet-protection password is used to remove editing restrictions on a worksheet. A password set through Encrypt with Password is required to open the encrypted workbook. They serve different purposes and are not interchangeable.

Can I recover a forgotten Excel protection password?

Excel does not provide a way for Microsoft to retrieve a forgotten password. Ask the file owner or your organization’s administrator about an authorized copy, backup, or password record. Treat passwords to encrypted files as especially important because losing one can prevent access to the contents.

Can people still copy data from a protected sheet?

Protection is not a dependable way to prevent someone who can view a workbook from copying or otherwise obtaining its contents. If a person should not see the data, restrict access to the file or keep that information in a separately controlled workbook.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.