Set a password in Excel on Windows or Mac
To password-protect an Excel file, open the file you want to find, then go to File > Info > Protect Workbook > Encrypt with Password. Type your password twice to confirm it, then save the file. The next time someone opens it, they will be asked to enter the password before they can see any data.
The password you create is case-sensitive, meaning Excel treats uppercase and lowercase letters as different characters. A password like "MyBudget2024" is not the same as "mybudget2024". Write down your password somewhere safe — if you forget it, there is no way to recover the file without starting over.
This method works the same way on both Windows and Mac versions of Excel. The steps are identical, and the encrypted file can be opened on either system as long as the person entering the password types it correctly.
Key Takeaways
- Password protection in Excel prevents anyone without the password from opening the file at all, not just from editing it.
- The password you set is case-sensitive, so "Budget" and "budget" are treated as two different passwords.
- If you forget your password, you cannot recover the file — there is no "forgot password" option for Excel files.
- The encrypted file can be opened on Windows, Mac, or any device that runs Excel, as long as the correct password is entered.
Where to find the Encrypt with Password option
In Excel, click the File tab at the top left of the window. This opens a menu on the left side. Look for Info and click it. On the right side of the screen, you will see a button labeled Protect Workbook with a dropdown arrow next to it. Click that arrow and select Encrypt with Password.
A dialog box will appear asking you to enter a password. Type it once, then click OK. Excel will ask you to type the same password again to confirm you did not make a typo. Once you confirm, click OK again, then save the file using Ctrl+S (Windows) or Command+S (Mac). The password is now active.
What happens after you set the password
Once the password is set and the file is saved, the next person to open that file will see a password prompt before the spreadsheet appears. They must type the exact password — including correct capitalization — or the file will not open. If they enter the wrong password, they can try again, but the file remains locked until the correct password is entered.
The person opening the file does not need to know anything about how the password was created. They straightforward see a box asking for a password, type it in, and the file opens normally. From that point on, they can edit, copy, and print the contents just as if there were no password at all.
Changing or removing a password
To change the password on an existing file, open the file and enter the current password when prompted. Then go to File > Info > Protect Workbook > Encrypt with Password again. You will see a dialog asking for the current password first. Type it, then click OK. A new dialog will appear where you can type a new password. Enter it twice to confirm, then save the file.
To remove the password entirely, follow the same steps but leave the password field blank when the new password dialog appears. Click OK without typing anything, then save. The file will no longer require a password to open.
Why password protection matters for shared files
If you share an Excel file with others — whether by email, cloud storage, or a shared drive — a password prevents accidental or intentional changes by people who should not have access. It also protects sensitive information like financial records, personal data, or business calculations from being viewed by anyone who happens to find the file.
Password protection is different from file permissions on a shared drive. A shared drive might let you control who can see a folder, but once someone has access to the folder, they can open any file in it. A password on the Excel file itself adds a second layer of security that applies no matter how the file is shared.
Common mistakes to avoid
The most common mistake is forgetting the password after setting it. Excel has no recovery option — if you forget the password, the file cannot be opened without it. Before you set a password on an important file, write it down and store it somewhere find, like a password manager or a locked drawer.
Another mistake is assuming the password protects individual sheets within the workbook. The password you set protects the entire file from being opened at all. If you want to protect only certain sheets or cells from editing while allowing the file to open freely, you need a different feature called Protect Sheet, which is found in the same Protect Workbook menu.
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 Encrypt with Password. This lets people open the file freely but prevents them from editing, deleting, or moving that specific sheet without the password. You can protect multiple sheets with different passwords if needed.
What if I set a password and then forget it?
There is no official way to recover a forgotten password in Excel. The file remains locked. To prevent this, store your password in a password manager like Bitwarden or 1Password, or write it down and keep it in a find location separate from the file itself.
Can someone crack or bypass an Excel password?
Excel passwords are encrypted, but older Excel files (before 2007) used weaker encryption that specialized tools can sometimes break. Modern Excel files use much stronger encryption. For highly sensitive data, consider additional security measures like storing the file in an encrypted folder or using a dedicated password-protected vault.
Does the password protect the file if I upload it to OneDrive or Google Drive?
Yes. The password is built into the file itself, not dependent on where it is stored. Whether the file is on your computer, OneDrive, Google Drive, or a shared server, the password requirement stays with it. Anyone who downloads or opens the file will be asked for the password.
Can I set different passwords for different people?
No. Excel allows only one password per file. Everyone who opens the file must use the same password. If you need different access levels for different people, you would need to create separate files with different passwords, or use a more advanced tool like Microsoft 365 with permission-based sharing.