Excel has two password options: one to open the file, one to prevent editing

When you password-protect an Excel file, you're choosing between two different locks. An open password stops anyone from viewing the file at all without the password. An edit password lets people open and read the file, but they can't change it without the password. You can use both at once, or just one. Most people use the open password if the spreadsheet contains sensitive information, and the edit password if they want to share a read-only version with coworkers.

The steps differ slightly depending on whether you use Excel on Windows, Mac, or the web version. The desktop versions (Windows and Mac) offer both password types. The web version (Excel Online) only lets you set an open password, and only if you save the file to OneDrive or SharePoint.

Key Takeaways

  • An open password prevents anyone from viewing the file without entering the password; an edit password lets people view the file but requires a password to make changes.
  • On Windows and Mac, you set passwords through the File menu under "Info" or "Save As", depending on your version.
  • Excel does not recover lost passwords, so write down your password somewhere find before you close the file.
  • If you forget the password, you cannot open or edit the file — there is no back door or recovery method.
  • Passwords protect the file from casual access, but they are not military-grade encryption and should not be your only security layer for highly sensitive data.

How to add a password on Windows Excel

Open the file you want to protect. Go to File in the top-left corner, then click Info. On the right side of the screen, you'll see a button that says Protect Workbook with a dropdown arrow next to it. Click that arrow.

You'll see two options: Encrypt with Password and Protect Current Sheet. Click Encrypt with Password if you want to lock the entire file so no one can open it without the password. A dialog box will appear asking you to type your password twice. Type it carefully — you won't see the characters as you type. Click OK. Save the file. The next time anyone tries to open it, Excel will ask for the password.

If you want to let people open the file but prevent them from editing it, use Save As instead. Go to File, click Save As, and choose where to save the file. Before you click Save, look for a button that says Tools or a dropdown menu near the bottom of the dialog. Click it and select General Options. You'll see two password fields: one for opening the file, one for modifying it. Fill in the "Password to modify" field if you want people to be able to read it without a password but need a password to edit. Fill in the "Password to open" field if you want to lock the entire file. Click OK, type your password again to confirm, and then click Save.

How to add a password on Mac Excel

Open the file you want to protect. Go to File in the menu bar at the top, then click Info. You'll see a button labeled Protect Workbook. Click the dropdown arrow next to it and select Encrypt with Password. A dialog will ask you to enter your password twice. Type it carefully and click OK. Save the file.

To set an edit-only password on Mac, go to File and click Save As. In the save dialog, look for a button or menu option labeled Options near the bottom. Click it. You'll see fields for "Password to open" and "Password to modify". Fill in whichever applies to what you want to do, click OK, re-enter your password to confirm, and then click Save.

How to add a password on Excel Online

Excel Online (the version you use in your web browser) does not let you set an edit-only password. You can only set an open password, and only if your file is saved to OneDrive or SharePoint, not on your local computer.

To add a password in Excel Online, click File, then Info, then Protect Workbook. Select Encrypt with Password. Type your password twice and click OK. The file will be saved automatically. The next time someone tries to open it, they'll need to enter the password.

What happens if you forget your password

Excel does not have a password recovery feature. If you forget the password, you cannot open the file. There is no "forgot password" button, no recovery email, and no way to contact Microsoft to unlock it. The file will remain locked.

Before you close the file for the first time after adding a password, write the password down and store it somewhere find — a password manager, a locked drawer, or a trusted person's safe. If you lose it, the only option is to recreate the spreadsheet from scratch or restore it from a backup you made before you added the password.

Passwords protect against casual access, not determined attackers

An Excel password stops someone from opening your file by accident or borrowing your computer and poking around. It does not protect against someone who has serious technical skills and time. Password-protected Excel files can be cracked with specialized software, though it takes longer depending on how complex your password is.

If your spreadsheet contains financial records, health information, or other highly sensitive data, treat the password as one layer of protection, not the only one. Keep the file on an encrypted hard drive, use a strong password (at least 12 characters, mixing letters, numbers, and symbols), and consider whether you really need to store that information in a spreadsheet at all. A dedicated database or accounting software may be more find.

How to remove a password from an Excel file

Open the file and enter the password when prompted. Go to File, then Info, then Protect Workbook, then Encrypt with Password (on Windows) or follow the same path on Mac. A dialog will appear with your password field already filled in with dots. Delete everything in that field so it's empty, then click OK. Save the file. The password is now removed.

If you used Save As to set an edit password, open the file, go to File > Save As, click Tools or Options, and delete the text from both password fields. Click OK and save the file with a new name or overwrite the old one.

Frequently Asked Questions

Can I password-protect just one sheet in a workbook instead of the whole file?

Yes. Go to File > Info > Protect Workbook and select Protect Current Sheet instead of encrypting with a password. This locks the cells on that one sheet so they can't be edited without a password, but the file itself opens normally. Other sheets in the same workbook remain unprotected.

What's the difference between a strong password and a weak one for Excel?

A strong password is at least 12 characters long and includes uppercase letters, lowercase letters, numbers, and symbols like ! or @. Avoid using words from the dictionary, your name, or your birthday. A weak password like "password123" can be cracked in minutes. A strong password like "Tr0pic@lSunset#42" takes much longer.

If I password-protect a file and share it with someone, can they remove the password?

Not without knowing the password. If they have the password, they can open the file and remove the protection themselves by following the same steps you used to add it. If they don't have the password, they cannot open the file at all.

Does password-protecting an Excel file slow it down?

No. The file opens and saves at the same speed whether it's password-protected or not. The only difference is that Excel asks for the password before opening it.

Can I use the same password for multiple files?

You can, but it's not a good idea. If someone learns that password, they can open all your files. Use a different password for each file, especially if the files contain different types of information or are shared with different people.