How to Password Protect an Excel File (and Lock Cells)

Password protect an Excel file
Excel has several kinds of protection, and they do quite different things. One stops anyone opening the file at all. Others let people open it but stop them accidentally breaking your formulas. Here's which to use and how.

Password to open the file (real security)

This encrypts the workbook — without the password, nobody can open it.
1. Open the workbook.
2. Go to File > Info.
3. Click Protect Workbook.
4. Choose Encrypt with Password.
5. Type a password and click OK, then type it again to confirm.
6. Save the file.
Next time anyone opens it, Excel asks for the password.
Important: Microsoft cannot recover a forgotten password. Store it somewhere safe, such as a password manager.
On a Mac: Review > Protect Workbook, or File > Passwords…

Protect a sheet from changes

Sheet protection stops people changing cells — useful for templates, forms and anything with formulas you don't want broken. It's about preventing accidents, not strong security.
1. Go to the sheet.
2. Click Review > Protect Sheet.
3. Optionally type a password.
4. Tick what people are still allowed to do — for example, Format columns, Sort or Use AutoFilter.
5. Click OK.
Anyone who tries to change a cell now sees a message that the sheet is protected.

Let people fill in some cells

For a form or template, you want some cells editable and the rest locked. Every cell is "Locked" by default — the lock only takes effect when the sheet is protected. So:
1. Select the cells people should be able to fill in.
2. Press Ctrl + 1 to open Format Cells.
3. Click the Protection tab.
4. Untick Locked and click OK.
5. Now go to Review > Protect Sheet and click OK.
Those cells stay editable; everything else is locked. Press Tab to jump between the unlocked cells.
Tip: Tick Hidden on the Protection tab for cells with formulas — once the sheet is protected, the formula won't show in the formula bar.

Protect the workbook structure

Review > Protect Workbook stops people adding, deleting, renaming, moving or unhiding sheets. The contents of each sheet can still be changed unless you protect those sheets too.

Password to modify (read-only for others)

Want people to open and read the file, but only you to save changes?
1. Go to File > Save As > Browse.
2. In the Save As window, click Tools > General Options…
3. Enter a Password to modify.
4. Click OK and save.
Others can open it as Read Only and save a copy under a different name, but they can't overwrite yours.

Which protection should I use?

You want to…Use
Stop anyone opening the fileEncrypt with Password
Stop accidental changes to cellsProtect Sheet
Allow input in some cells onlyUnlock those cells, then Protect Sheet
Stop sheets being added or deletedProtect Workbook (structure)
Let people read but not save changesPassword to modify

Remove a password

• Password to open: open the file, go to File > Info > Protect Workbook > Encrypt with Password, delete the password, click OK and save.
• Sheet protection: Review > Unprotect Sheet and enter the password.
• Workbook structure: click Review > Protect Workbook again.

Wrapping up

For confidential files, File > Info > Protect Workbook > Encrypt with Password is the one that really keeps people out. For forms and templates, unlock the input cells and use Review > Protect Sheet. And whichever you choose, don't lose the password.