How to Protect an Excel File From Editing: 5 Built-In Methods
Learn how to protect an Excel file from editing with sheet protection, workbook structure locks, passwords, Mark as Final and view-only sharing, and what each one stops.
To protect an Excel file from editing, open the Review tab and choose Protect Sheet (to lock cells) or Protect Workbook (to lock the sheet structure), optionally with a password. If you want to stop people from opening the file at all, use File > Info > Protect Workbook > Encrypt with Password in the desktop app.
Excel has several protection features, and they don’t do the same job. Picking the wrong one is the most common mistake: a sheet password keeps a colleague from overwriting a formula, but it is not a security control for sensitive data. The guide below explains each option, when to use it, and where it falls short. Menu names are from current Microsoft 365 documentation as of October 2026, and Microsoft does move labels around from time to time.
Which protection option do you need?
| Goal | Feature | Where to find it | How strong is it? |
|---|---|---|---|
| Stop changes to cells and formulas | Protect Sheet | Review > Protect Sheet | Guards against accidental edits; not encryption |
| Stop adding, deleting, renaming or unhiding sheets | Protect Workbook (structure) | Review > Protect Workbook | Locks structure only |
| Stop anyone without the password from opening the file | Encrypt with Password | File > Info > Protect Workbook | The strongest built-in option |
| Signal that a file is finished | Mark as Final | File > Info > Protect Workbook | A deterrent; anyone can click Edit Anyway |
| Share without giving edit rights | View-only link | Share > Can view | Depends on OneDrive/SharePoint permissions |
You can combine these. A common setup for a shared template is: unlock the input cells, protect the sheet, protect the workbook structure, and share it as view-only for people who only need to read it.
Method 1: Protect a worksheet (lock cells)
Microsoft describes worksheet protection as a two-step process: first unlock the cells people are allowed to edit, then protect the sheet with or without a password. Every cell is set to “Locked” by default, but that setting does nothing until the sheet is protected.
Step 1: Unlock the cells others may edit
- Select the cells that should stay editable (for example, input fields in a form).
- Press Ctrl+1 (or Command+1 on a Mac), or right-click and choose Format Cells.
- Go to the Protection tab and clear the Locked check box.
- Click OK.
Skip this step if you want the entire sheet to be read-only.
Step 2: Turn on protection
- Go to Review > Protect Sheet.
- Optionally enter a password. Without one, anyone can unprotect the sheet from the same menu.
- In the list of actions users are allowed to perform, tick only what you want to permit. A tip from Computer Hope and other guides: leaving only Select unlocked cells checked means people can click into the editable cells and nothing else. The exact list can vary by Excel version, so check it in yours.
- Click OK and re-enter the password if prompted.
To remove protection later, go back to Review and choose Unprotect Sheet.
Give different people different editable ranges
If several people fill in different parts of one sheet, use Allow Edit Ranges. According to Microsoft Learn:
- Start with an unprotected sheet.
- Go to Review > Allow Edit Ranges > New.
- Name the range, select its cells, and set a range password.
- Repeat for each range, then protect the sheet with Protect Sheet.
Each person only needs the password for their own range. Office Watch walks through the same feature in more detail.
Method 2: Protect the workbook structure
Sheet protection doesn’t stop someone from deleting or renaming an entire tab. For that, Microsoft’s Protect a workbook article points to structure protection, which prevents other users from adding, moving, deleting, hiding, unhiding or renaming sheets.
- Go to Review > Protect Workbook.
- Make sure Structure is selected.
- Enter an optional password and confirm it.
This doesn’t lock cell contents, so pair it with sheet protection if you need both.
Method 3: Encrypt the file with a password
If the real concern is who can see the data, not just who can change it, encrypt the file. Microsoft’s Protect an Excel file steps for the desktop app:
- Go to File > Info.
- Select Protect Workbook and choose Encrypt with Password.
- Enter a password, click OK, then re-enter it to confirm.
- Save the file.
Anyone opening the file now needs the password. Two important caveats:
- There is no recovery. Microsoft’s Protection and security in Excel page warns that if you lose or forget the password, Microsoft can’t retrieve it. Store it in a password manager.
- Not available in the browser. Microsoft notes that encrypting a workbook with a password currently isn’t possible in Excel for the web, so you’ll need the Windows or Mac desktop app.
Method 4: Mark as Final
Mark as Final is a polite “please don’t edit” sign. Microsoft’s support article says it makes the file read-only, disables typing and editing commands, and sets the document’s Status property to Final.
- Go to File > Info.
- Choose Protect Workbook > Mark as Final.
- Confirm and save.
The catch: recipients see a yellow bar with an Edit Anyway button, and clicking it removes the status. Use it to prevent accidental changes to a signed-off report, not to enforce anything.
Method 5: Share as view-only (OneDrive and SharePoint)
If the workbook lives in OneDrive or SharePoint, sharing permissions are often the cleanest answer, because people who only need to read the file never get edit rights in the first place. Microsoft’s Excel for the web sharing guide says to select Share, choose Can view, and send. Work or school accounts may be limited to sharing inside your organization, depending on your admin’s settings.
In Excel for the web, sheet-level protection sits under the Review tab. A Microsoft Tech Community answer describes it as Manage Protection, while some guides show a Protect Sheet button, so the label may differ depending on your version or rollout. The same thread notes that workbook structure protection isn’t available in the browser, so set that up in the desktop app if you need it.
What Excel protection does not do
Be realistic about what these features are for:
- Sheet and workbook protection are not encryption. Microsoft states that protecting a worksheet only prevents changes to locked cells and isn’t the same as protecting the file with a password. Anyone who can open the file can still read the data, and hidden sheets or formulas aren’t truly secret.
- Sheet passwords are a speed bump. Several sources note these passwords can be bypassed with enough effort. They’re good at stopping accidental edits, not a determined person.
- Lost passwords stay lost. Microsoft offers no official way to recover a forgotten sheet, workbook or file password. Third-party “unlock” sites make conflicting claims and aren’t supported by Microsoft; don’t upload confidential files to them.
A practical setup for shared team files
For a team template or tracker that should survive past the first month, this combination works well:
- Unlock only the input cells and protect each sheet, with a password stored in your team’s password manager.
- Protect the workbook structure so tabs don’t get deleted or renamed.
- Keep an unprotected master copy in a restricted folder.
- Share the working copy as Can view with people who only need to read it, and give edit access only to those who fill it in.
- If the data is confidential, encrypt the file or rely on OneDrive/SharePoint permissions rather than sheet passwords.
This keeps everyday edits safe without giving anyone a false sense of security.
Free apps worth trying
SponsoredSponsored links. Installing through them can earn us a commission, at no cost to you. Apps are free to download; some offer optional in-app purchases.
Frequently asked questions
Can I recover an Excel password if I forget it? +
Microsoft says it cannot retrieve a lost or forgotten password for you. Keep passwords in a password manager, and keep an unprotected master copy somewhere safe if losing access would hurt.
Does protecting a sheet stop people from seeing my data? +
No. Sheet protection only blocks changes to locked cells; it does not encrypt the file or hide its contents. If the data itself is confidential, use File > Info > Protect Workbook > Encrypt with Password in the desktop app.
Can I let people edit some cells but not others? +
Yes. Unlock the input cells (Format Cells > Protection, clear Locked) before you protect the sheet, or use Review > Allow Edit Ranges to give specific ranges their own passwords. Everything still locked stays read-only.
Can I add a password to open a file in Excel for the web? +
Microsoft notes that encrypting a workbook with a password isn't currently possible in Excel for the web. Use the desktop app for that, or control access with view-only sharing instead.
Sources
- Protect a worksheet - Microsoft Support (support.microsoft.com)
- Protect a workbook - Microsoft Support (support.microsoft.com)
- Protect an Excel file - Microsoft Support (support.microsoft.com)
- Protection and security in Excel - Microsoft Support (support.microsoft.com)
- Help prevent changes to a final version of a file - Microsoft Support (support.microsoft.com)
- Share a workbook in Excel for the web - Microsoft Support (support.microsoft.com)
- Apply different passwords to separate ranges in Excel - Microsoft Learn (learn.microsoft.com)
- How to protect Excel sheets from unwanted changes - Part 2 (Office Watch) (office-watch.com)