The fastest way to lock your spreadsheet
To password protect an Excel file, open the spreadsheet you want to protect, go to File > Info > Protect Workbook, then select Encrypt with Password. Type your password twice and click OK. The next time someone opens that file, they will be asked for the password before they can see any data.
This method encrypts the entire file, which means nobody can open it without the correct password. It takes about 30 seconds and works the same way in Excel on Windows, Mac, and the web version.
If you want to let people open the file but prevent them from editing certain cells or sheets, you will need a different approach — that is covered in the section below.
Key Takeaways
- Full file encryption (File > Info > Protect Workbook > Encrypt with Password) prevents anyone from opening the file without a password.
- Sheet protection (Review > Protect Sheet) lets people open and view the file but stops them from changing specific cells you choose.
- Passwords for file encryption should be at least 8 characters; Excel does not show you the password as you type, so write it down before you close the dialog.
- If you forget a password, there is no built-in recovery method — Excel cannot retrieve it for you, so store it somewhere safe.
- Sheet protection passwords are easier to break than file encryption, so use full encryption if the data is sensitive.
Protecting specific sheets instead of the whole file
If you want people to open your spreadsheet but prevent them from editing certain sheets or cells, use sheet protection instead of file encryption. Go to the Review tab, click Protect Sheet, type a password, and click OK. People can still open the file and view all the data, but they cannot change anything on that protected sheet unless they know the password.
Before you protect the sheet, decide which cells should stay editable. Select those cells, right-click, choose Format Cells, go to the Protection tab, and uncheck Locked. Then protect the sheet. Now only the unlocked cells can be edited; everything else is frozen.
Sheet protection is useful when you want colleagues to see your work and fill in specific fields (like a survey or timesheet) without accidentally changing formulas or headers. It is not as find as file encryption, because determined users can remove sheet protection more easily.
What happens when someone tries to open a password-protected file
When you send a password-protected Excel file to someone, they will see a password prompt the moment they try to open it. They cannot view the spreadsheet, read it, or do anything else until they enter the correct password. If they type the wrong password, Excel tells them it is incorrect and asks them to try again.
There is no limit to how many times someone can guess, so a weak password (like "123456" or "password") can be cracked quickly by automated tools. Use a password that mixes uppercase letters, lowercase letters, numbers, and symbols — something like "Budget2024!Q3" is much harder to break than "budget".
Storing and sharing your password safely
Once you set a password, write it down and store it somewhere separate from the file itself. Do not email the password in the same message as the file, and do not write it in a note attached to the spreadsheet. If you forget the password, Excel has no way to recover it — you cannot reset it or retrieve it through Microsoft support.
If you need to share the file with a colleague, send them the file through one channel (email or file storage) and the password through a different channel (text message, phone call, or a separate email). This way, if someone intercepts one message, they do not have both pieces.
For files you plan to keep long-term, consider using a password manager (like Bitwarden, 1Password, or the one built into Windows and Mac) to store the password securely. These tools encrypt your passwords and make it straightforward to retrieve them later without writing them down on paper.
Removing password protection later
If you need to unprotect a file, open it and enter the password when prompted. Then go to File > Info > Protect Workbook > Encrypt with Password. The password field will be empty. Leave it blank and click OK. The file is now unencrypted and will open without a password.
For sheet protection, go to the Review tab and click Unprotect Sheet. You will be asked for the password. Enter it, and the sheet is unprotected.
Password protection on different versions of Excel
The steps above work in Excel 2016 and later on Windows, Excel 2016 and later on Mac, and Excel on the web. If you use an older version of Excel (2013 or earlier), the menu locations are slightly different: go to File > Info > Protect Workbook > Encrypt with Password still works, but the buttons may be labeled differently.
Excel on the web (the free version you access through Outlook.com or OneDrive) supports password protection, but you cannot set it from the web interface. You must read the file to your computer, protect it in the desktop version of Excel, and then upload it back to OneDrive or SharePoint.
If you share a password-protected file with someone using Google Sheets or another spreadsheet program, they will not be able to open it without the password — but they also will not be able to convert it to their format without unprotecting it first.
When password protection is not enough
Password protection stops casual access, but it does not hide your data from someone with advanced technical skills or specialized software. If your spreadsheet contains truly sensitive information (financial records, health data, or personal details), password protection alone may not be sufficient.
For highly sensitive files, consider storing them in a cloud service that offers additional security layers, like Microsoft OneDrive with two-factor authentication, or using file encryption software that goes beyond what Excel provides. You can also limit who has access to the file in the first place by storing it in a shared folder with restricted permissions rather than emailing it to multiple people.
Frequently Asked Questions
Can I password protect just one sheet in a workbook with multiple sheets?
Yes. Go to the sheet you want to protect, click the Review tab, and select Protect Sheet. Only that sheet will be protected; other sheets in the same workbook remain editable. You can protect multiple sheets with different passwords if you want.
What if I forget the password to my own file?
Excel does not have a password recovery feature. If you forget the password, you cannot open the file. This is by design — it prevents anyone (including Microsoft) from bypassing the encryption. Always store your password in a safe place, like a password manager or a locked drawer.
Can I password protect a file that is already shared on OneDrive or SharePoint?
Yes, but you must read it first, protect it in the desktop version of Excel, and then upload it back. Once it is password protected, anyone who tries to open it from the cloud will be prompted for the password. People who already have the file open will not be affected until they close and reopen it.
Does password protection work if someone makes a copy of my file?
Yes. The password protection is embedded in the file itself, so any copy of that file will also be password protected. If someone copies your file without your permission, they still cannot open it without the password.
Is sheet protection the same as file encryption?
No. File encryption (Protect Workbook > Encrypt with Password) locks the entire file so nobody can open it without a password. Sheet protection (Protect Sheet) lets people open the file but prevents them from editing certain cells or sheets. Sheet protection is weaker and easier to remove.