To password-protect an Excel file, open the workbook, go to File > Info > Protect Workbook > Encrypt with Password, type a password, and save. That single step locks the entire file so nobody can open it without the password. You can also restrict editing or lock specific sheets, but those are separate options covered below. This guide walks through each method on Windows and Mac, plus the mistakes that make people think protection failed when it actually worked.
What You'll Need
- Microsoft Excel 2016 or later, or Microsoft 365 (the menus are nearly identical; labels can differ slightly by version, device, or region).
- The workbook saved in a modern format (.xlsx or .xlsm). Very old .xls files use a different dialog.
- A password you will not forget, stored in a password manager. Microsoft cannot recover a lost password.
Step-by-Step
Method 1: Require a password to open the file (strongest)
- Open the workbook you want to protect.
- Click File in the top-left corner, then Info.
- Click Protect Workbook and choose Encrypt with Password. A small dialog box appears.
- Type your password in the Password box. Use at least 12 characters mixing upper and lower case, numbers, and symbols.
- Click OK. Excel asks you to confirm.
- Retype the password exactly and click OK.
- Save the file with Ctrl+S (Windows) or Command+S (Mac). The protection only takes effect after saving.
- Close and reopen the file to test. You should see a password prompt before any content appears.
On Mac, the path is File > Passwords (or File > Protect Workbook in some versions), then set a password to open. The same save-and-test rule applies.
Method 2: Restrict who can edit (without blocking opening)
- Open the workbook and go to File > Info > Protect Workbook.
- Choose Mark as Final if you only want to discourage edits. This does not encrypt anything and anyone can click through the warning, so treat it as a hint, not security.
- For real edit restriction, use File > Save As, click Tools next to the Save button, and choose General Options. Set a password to modify. Readers can open the file read-only without the password.
Method 3: Lock individual sheets
- Right-click the sheet tab and choose Protect Sheet.
- Enter a password and choose what users may still do (select cells, format, sort).
- Click OK. Repeat for each sheet you want locked.
- Remember that sheet protection is easy to bypass with third-party tools. Use it to prevent accidental edits, not to keep secrets.
Common Mistakes
- Not saving after setting the password. The dialog closes and people assume it is done. Press Save and reopen to confirm.
- Using Mark as Final as security. It is a visual flag only; the file remains fully readable.
- Protecting only one sheet. Other sheets stay open. Encrypt the whole workbook if the data is sensitive.
- Choosing a short or reused password. Excel allows weak passwords; attackers do not.
- Forgetting that password-protected files cannot be recovered. Microsoft support will not unlock them.
- Emailing the password in the same message as the file. Send it by a different channel, such as a phone call or a separate app.
Tips
- Store the password in a password manager before you save. This is the single best protection against lockout.
- Use Encrypt with Password for anything containing personal, financial, or client data. It encrypts the file contents, not just the opening screen.
- If you share a workbook for review, set a modify password rather than an open password, so reviewers can read without editing.
- Keep an unprotected master copy in a secure folder in case you need to change the password later.
- When sending by email, consider zipping the file with a password as an extra layer, but remember zip passwords are weaker than Excel encryption.
Troubleshooting
The password prompt never appears. The file was probably not saved after encryption. Open it, repeat the Encrypt with Password step, and save again. Also check you are opening the saved copy, not an autosaved temporary version.
Excel says the password is incorrect. Check Caps Lock and keyboard layout. If you copied the password, watch for a trailing space. If it still fails, the password is lost; Excel offers no recovery. Restore from a backup or an earlier unprotected copy if one exists.
The Protect Workbook option is greyed out. The workbook may be open in Protected View or read-only. Close it, then reopen from a local folder you can write to. Shared workbooks and some files stored on restrictive network drives also block encryption.
You can still edit a protected sheet. Sheet protection only blocks the actions you left unchecked. Reopen Protect Sheet and review the allowed actions. For real security, encrypt the whole file instead.
The file will not open on another device. Confirm the other device runs a version of Excel that supports encrypted .xlsx files. Very old Excel versions and some third-party viewers cannot open encrypted workbooks.
Frequently Asked Questions
Can I recover an Excel file if I forget the password?
No. Microsoft does not keep a copy of your password and cannot unlock the file. Your only options are a backup or an earlier unprotected version.
Does password protection encrypt the whole file?
Encrypt with Password does encrypt the file contents. Sheet protection and Mark as Final do not; they only limit editing in the app.
Can someone bypass sheet protection?
Yes. Sheet protection is not strong encryption and third-party tools can remove it. Use file encryption for confidential data.
What is the difference between an open password and a modify password?
An open password is required to view the file at all. A modify password lets people open it read-only but requires the password to make changes.
Does password protection work on Excel for Mac and mobile?
Yes for opening encrypted files. Setting encryption is available on Excel for Mac and in the Excel mobile app, though the menu labels differ from Windows.
Can I remove a password later?
Yes, if you know it. Open the file, go to File > Info > Protect Workbook > Encrypt with Password, delete the password, and save.