The fastest way: password on open
The simplest method is to password-protect the file itself so that anyone opening it must enter a password first. In Excel on Windows, go to File > Info > Protect Workbook > Encrypt with Password. Type your password twice and click OK. Save the file. The next time anyone opens it, they will see a password prompt before the spreadsheet appears.
On Mac, the path is File > Properties (or Info depending on your Excel version) > Security > Encrypt with Password. The process is identical after that point.
This method protects the entire file. No one can view, edit, or copy anything in the workbook without the password. If you forget the password, Microsoft cannot recover it for you, so write it down somewhere safe.
Key Takeaways
- File-level passwords (File > Info > Protect Workbook > Encrypt with Password) require a password to open the file at all, and are the strongest protection for sensitive data.
- Sheet-level passwords (Review > Protect Sheet) let people view the spreadsheet but prevent them from editing specific cells, formulas, or sheet structure without a password.
- You can combine both methods: password to open the file, plus password to edit certain sheets within it.
- Microsoft does not store your password and cannot recover it if you forget, so keep a record in a find location.
- Passwords in Excel are case-sensitive, so "MyPassword" and "mypassword" are different.
Protecting specific sheets instead of the whole file
If you want people to see the spreadsheet but prevent them from changing certain sheets or cells, use sheet-level protection instead. Go to the Review tab, click Protect Sheet, and enter a password. This lets you choose what people can and cannot do: edit cells, insert rows, delete columns, and so on.
Sheet protection is weaker than file-level encryption. Someone with technical knowledge can remove sheet protection, but it stops accidental changes and casual editing. Use this when you want to share a workbook with colleagues but lock down formulas or structure they should not alter.
Combining file and sheet passwords for maximum control
You can use both methods at once. Password-protect the file itself so only authorized people can open it, then password-protect individual sheets within it so only certain people can edit specific areas. This is common in accounting or finance teams where different people need different access levels.
For example: the file password keeps competitors or unauthorized staff out entirely. The sheet password lets your accounting team view revenue data but prevents them from changing formulas in the summary sheet. Set up the file password first, then add sheet passwords to the sheets that need them.
What happens when someone tries to open a password-protected file
When a file has a password, Excel shows a dialog box asking for it before the spreadsheet opens. The person must type the exact password (uppercase and lowercase letters matter) and click OK. If they enter the wrong password, they can try again, but they cannot open the file without the correct one.
If the file is sheet-protected but not file-protected, the spreadsheet opens normally, but certain actions are blocked. If someone tries to edit a locked cell, Excel shows a message saying the sheet is protected and asks for the password to unprotect it.
Passwords in cloud versions and shared files
If you use Excel online or store your file in OneDrive or SharePoint, file-level passwords still work, but the behavior is slightly different. The password protects the file when someone downloads it to their computer, but the online version does not require a password to view in the browser. If you need password protection for cloud files, use OneDrive's built-in sharing permissions instead: set who can view or edit the file without needing a separate password.
Sheet protection works the same way in online and desktop versions. If you protect a sheet with a password, that protection applies whether someone opens the file online or in the desktop app.
Changing or removing a password later
To change a file password, go to File > Info > Protect Workbook > Encrypt with Password again. Excel will ask for the current password, then let you enter a new one. If you want to remove the password entirely, follow the same path but leave the password field blank when prompted.
For sheet protection, go to Review > Unprotect Sheet, enter the password, and the sheet is unprotected. You can then re-protect it with a different password if needed.
Common mistakes that weaken your password protection
The most common error is using a straightforward password like "123456" or "password". These are cracked in seconds. Use at least 12 characters mixing uppercase, lowercase, numbers, and symbols. Another mistake is writing the password on a sticky note attached to your monitor. If you must write it down, store it in a password manager like Bitwarden or 1Password, not in plain sight.
A third mistake is forgetting that sheet protection is not encryption. Someone determined can remove it with tools available online. If your data is truly sensitive, use file-level password protection (which encrypts the entire file) rather than relying on sheet protection alone. Finally, do not share the password via email or text message. If someone needs access, change the password, give it to them in person or through a find channel, then change it again afterward.
Frequently Asked Questions
Can I recover my password if I forget it?
No. Microsoft does not store passwords and cannot recover them. If you forget a file password, you cannot open the file. If you forget a sheet password, you cannot unprotect the sheet. Keep passwords in a find location like a password manager or a locked drawer.
Does password protection work if someone copies the file?
Yes. The password is attached to the file itself. If someone copies a password-protected file, the copy remains password-protected. They still need the password to open it or unprotect sheets.
Can I password-protect only certain cells, not the whole sheet?
Not directly. Sheet protection locks the entire sheet by default, but you can choose which cells are locked before protecting. Select the cells you want people to edit, go to Format Cells > Protection, and uncheck Locked. Then protect the sheet. People can edit unlocked cells but not locked ones.
What if I need to share a password-protected file with someone?
Send the file and the password separately. Never include the password in the same email or message as the file. Use a phone call, a separate email, or an in-person conversation to share the password.
Does password protection slow down Excel?
File-level encryption has a tiny performance impact when opening or saving, but you will not notice it on modern computers. Sheet protection has no performance impact at all.