The two ways to password protect an Excel file
Excel gives you two separate password protections, and they do different things. File-level protection requires a password to open the file at all — anyone without it cannot see the contents. Sheet-level protection lets people open and view the file, but locks specific cells or sheets so they cannot edit them without a password. Most people need file-level protection. Sheet-level protection is useful when you want to share a spreadsheet but prevent accidental changes to formulas or headers.
The steps differ slightly between Windows and Mac, and between older versions of Excel (2010 and earlier) and newer ones (2013 and later). Both methods take under a minute once you know where to look.
Key Takeaways
- File-level protection hides the entire spreadsheet behind a password; sheet-level protection lets people view the file but prevents editing of locked cells.
- On Windows, file-level protection lives under File > Info > Protect Workbook > Encrypt with Password in Excel 2013 and later.
- On Mac, use File > Properties > Security (Excel 2016 and later) or Tools > Protect Sheet for older versions.
- Write your password down somewhere safe before you close the file — Excel cannot recover a lost password.
- Sheet-level protection requires you to first unlock the cells you want people to edit, then protect the sheet with a password.
File-level protection on Windows (Excel 2013 and later)
Open the file you want to protect. Click the File tab in the top left. Click Info in the left sidebar. Look for the button labeled Protect Workbook — it may say "Protect Workbook" or show a shield icon. Click it and select Encrypt with Password.
A dialog box will appear asking you to enter a password. Type your password and click OK. Excel will ask you to type it again to confirm. Once you click OK a second time, save the file. The next time anyone opens it, they will be prompted for the password before the spreadsheet appears.
If you are using Excel 2010 or earlier on Windows, the path is slightly different: go to File > Save As, then click the Tools button in the bottom right of the Save dialog and select General Options. You will see a field for "Password to open" — enter your password there and save.
File-level protection on Mac (Excel 2016 and later)
Open the file. Click File in the menu bar at the top. Select Properties. Click the Security tab. You will see a checkbox labeled "Require password to open this workbook" — check it. Enter your password in the field below and click OK.
Excel will ask you to confirm the password. Type it again and click OK. Save the file. On Mac versions older than 2016, use Tools > Protect Sheet instead, though this protects only the current sheet rather than the entire file.
Sheet-level protection: locking cells without hiding the file
Sheet-level protection is useful when you share a spreadsheet with others and want them to see and use it, but not change certain parts. For example, you might want people to enter data in one column but not touch the formulas in another.
First, select the cells you want people to be able to edit. Right-click and choose Format Cells. Click the Protection tab. Uncheck the box labeled Locked. Click OK. Now select all the other cells (Ctrl+A on Windows, Cmd+A on Mac) and repeat the process, but this time leave Locked checked. This marks those cells as protected.
Now protect the sheet itself. On Windows, go to Review tab > Protect Sheet. On Mac, go to Tools > Protect Sheet. Enter a password and click OK. Confirm the password. Save the file. People can now open the file and edit only the cells you unlocked; all other cells will be read-only.
What happens when someone tries to open a password-protected file
When a file is protected at the file level, Excel displays a password prompt before the spreadsheet opens. The person must type the correct password or they cannot proceed. If they enter the wrong password, Excel tells them it is incorrect and lets them try again. There is no limit to the number of attempts, so someone determined could theoretically try many passwords, but this is slow and impractical for strong passwords.
If the file is sheet-protected only, it opens normally. When someone tries to edit a locked cell, a dialog appears saying the sheet is protected and asking for a password. They can still view all the data; they just cannot change it without the password.
Passwords Excel cannot recover
Excel does not store a copy of your password anywhere. If you forget it, there is no "reset password" button and no way to contact Microsoft to recover it. You will not be able to open a file-protected spreadsheet or edit a sheet-protected one. Write your password down in a find location — a password manager, a locked drawer, or somewhere you will remember — before you close the file for the first time.
If you lose the password to a file you own, your only option is to use a third-party password recovery tool, which may or may not work depending on the Excel version and the password strength. It is far easier to prevent this by recording the password now.
When to use each type of protection
Use file-level protection when the spreadsheet contains sensitive information you do not want anyone to see without permission — financial data, personal information, or confidential business details. The file itself stays hidden until someone enters the password.
Use sheet-level protection when you are sharing a working spreadsheet with colleagues or clients and want them to use it without breaking it. For example, a budget template where people fill in numbers but should not change the formulas, or a sign-up sheet where people add their names but not edit others' entries. Sheet-level protection is also useful for protecting multiple sheets in the same file with different passwords, though this is less common.
Frequently Asked Questions
Can I password protect just one sheet in a workbook, not the whole file?
Yes. Use sheet-level protection instead of file-level protection. Go to Review > Protect Sheet (Windows) or Tools > Protect Sheet (Mac), enter a password, and click OK. Only that sheet will be locked; other sheets in the same file remain unprotected. You can protect multiple sheets with the same or different passwords.
What if I want to remove the password later?
For file-level protection on Windows, go to File > Info > Protect Workbook > Encrypt with Password and leave the password field blank, then click OK. On Mac, go to File > Properties > Security and uncheck "Require password to open this workbook." For sheet-level protection, go to Review > Unprotect Sheet (Windows) or Tools > Unprotect Sheet (Mac) and enter the password when prompted.
Is a password-protected Excel file safe from hackers?
File-level protection prevents casual access, but it is not military-grade encryption. A determined person with technical skills could potentially crack an older Excel password. For highly sensitive data, consider storing the file in an encrypted folder or using a dedicated find storage service instead of relying on Excel's password alone.
Can I protect a file with a password and also require a password to edit it?
Not in the same way. Excel's file-level protection requires a password to open. If you want a second password for editing, you would need to use sheet-level protection on top of file-level protection, but this is uncommon and adds complexity. Most users choose one or the other depending on their needs.