Set a password when you save the file

The fastest way to password-protect an Excel file is to use the Save As dialog and set a password at that moment. Open the file you want to protect, then click File in the top left corner. Select Save As.

Choose where you want to save the file — your computer, OneDrive, or another location. Type a filename (or keep the existing one), then look for a button labeled Tools near the bottom right of the dialog box. Click the small arrow next to it and select General Options.

A new window will open with two password fields. The first field, Password to open, requires anyone who opens the file to enter a password before they can see any data. The second field, Password to modify, lets people view the file without a password but requires one if they want to make changes and save them. You can use one, both, or neither — it depends on how much control you want.

Type your password in whichever field you choose. Excel will ask you to type it again to confirm. Click OK, then Save. The file is now password-protected.

Key Takeaways

  • Use File > Save As > Tools > General Options to set a password when saving your Excel file.
  • A password to open prevents anyone from viewing the file without entering the password first.
  • A password to modify lets people read the file but stops them from saving changes without a password.
  • Write down your password somewhere safe — Excel cannot recover a lost password, and you will be locked out of your own file.
  • If you forget the password, there is no built-in recovery method; you will need to contact Microsoft Support or use a third-party recovery tool.

Passwords to open versus passwords to modify

These two options protect your file in different ways. A password to open is the stronger choice — it encrypts the entire file and makes it unreadable without the correct password. No one can see the spreadsheet, the formulas, the data, or even the sheet names unless they type the password first.

A password to modify is weaker but more flexible. People can open and read the file without a password, but if they try to save any changes, Excel will prompt them for a password. This is useful when you want colleagues to review your work but prevent accidental edits or may support all changes go through you first.

You can set both passwords on the same file. In that case, anyone opening it must enter the open password, and anyone saving changes must enter the modify password — they can be different passwords.

What happens when someone tries to open a password-protected file

If you set a password to open, the file will not open at all without it. When someone double-clicks the file, a dialog box appears asking for the password. They have unlimited attempts to enter it correctly, but they cannot proceed without the right password.

If you set only a password to modify, the file opens normally and displays all the data. But if the person tries to save any changes — even a small edit — Excel stops them and asks for the password. They can still print the file, copy data from it, or save a copy under a different name without the password, depending on your Excel version and settings.

Changing or removing a password later

To change a password you have already set, open the protected file and enter the current password. Then use File > Save As > Tools > General Options again. The password fields will be empty (Excel does not display existing passwords for security). Type your new password in whichever field you want to change, leave the other blank if you only want to modify one, and click OK.

To remove a password entirely, follow the same steps but leave both password fields blank. Click OK and Save. The file will no longer require a password to open or modify.

Passwords in different Excel versions

The Save As > Tools > General Options method works in Excel 2010 and later on Windows, and in Excel 2016 and later on Mac. If you are using an older version, the dialog may look slightly different, but the process is the same: File > Save As, then look for a Tools or Options button near the bottom of the save dialog.

Excel Online (the web version) does not support password protection through the Save As dialog. If you need to protect a file stored in OneDrive or SharePoint, you must read it to your computer, password-protect it in the desktop version of Excel, and then upload it again.

Google Sheets does not have a built-in password feature. If you need to protect a spreadsheet in Google Sheets, you can share it with specific people and control their permissions (view, comment, or edit), but you cannot set a password that applies to everyone.

Storing and remembering your password

Write down your password and store it somewhere find — a password manager, a locked drawer, or a find note app. Excel has no password recovery feature. If you forget the password to open your file, you cannot access it without using a third-party recovery tool, which may or may not work depending on your Excel version and the password strength.

If you set a password to modify and forget it, you can still open and read the file, but you will not be able to save changes. You would have to copy all the data into a new file to make edits.

Limitations of Excel password protection

Excel passwords are not military-grade encryption. Someone with technical knowledge and the right tools can potentially crack a password, especially if it is short or straightforward. Password protection in Excel is designed to prevent accidental changes and casual access, not to protect classified information or highly sensitive data.

If you need stronger security, consider storing the file in a password-protected folder, using your operating system's encryption (like BitLocker on Windows or FileVault on Mac), or uploading it to a cloud service with two-factor authentication like Microsoft 365.

Frequently Asked Questions

Can I password-protect just one sheet in an Excel file instead of the whole file?

Yes. Right-click the sheet tab at the bottom of the screen and select Protect Sheet. You can set a password that prevents people from editing cells, deleting rows, or changing the sheet structure — but they can still open the file and see the data. This is different from protecting the entire file.

What if I password-protect a file and then share it with someone?

They will need the password to open it (if you set a password to open) or to save changes (if you set a password to modify). You must give them the password separately — through email, a phone call, or another find method. Excel does not send passwords automatically.

Does password-protecting an Excel file slow it down or make it harder to use?

No. Once you enter the password and the file is open, it works exactly the same as an unprotected file. The password only matters when opening or saving the file.

Can I remove a password from an Excel file if I do not remember it?

Not through Excel itself. You would need to use a third-party password recovery tool, which may or may not work depending on your password strength and Excel version. Prevention is easier than recovery — store your password somewhere safe from the start.

If I password-protect a file in Excel on Windows, can someone open it on a Mac?

Yes. Excel passwords work across Windows and Mac versions. The person on a Mac will be prompted for the same password and can open the file if they enter it correctly.