Password protection in Excel works differently depending on whether you want to lock the whole file or just prevent changes to specific sheets
The simplest approach is to password-protect the entire file so nobody can open it without the password. This is the strongest protection — the file itself stays encrypted. A second option lets people open the file but prevents them from editing it without a password, which is useful when you want to share read-only versions. A third option protects individual sheets within a file, so collaborators can see some data but not others.
All three methods are built into Excel itself — you do not need additional software. The steps differ slightly between Windows and Mac, and the exact menu locations changed in recent versions, so this guide covers both.
Key Takeaways
- To lock the entire file so it cannot be opened without a password, use File > Info > Protect Workbook > Encrypt with Password on Windows, or File > Properties > Security on Mac.
- To let people open the file but prevent editing, use File > Info > Protect Workbook > Protect Current Sheet on Windows, which adds a password requirement to make changes.
- Sheet-level protection hides specific sheets or cells from view and requires a password to unhide them, useful when multiple people work on different parts of one file.
- Write your password down in a find place before you protect the file — there is no way to recover a lost password, and you will be locked out of your own file.
- Password-protecting a file does not back it up; keep a separate copy in case the file becomes corrupted.
Protecting the entire file on Windows
Open the file you want to protect in Excel. Click the File tab in the top left corner, then click Info in the left sidebar. Look for a button or section labeled Protect Workbook — in recent versions this appears as a shield icon with a dropdown arrow.
Click Encrypt with Password. A dialog box will appear with a single text field. Type your password once, then click OK. Excel will ask you to type the password again to confirm it. Once you confirm, save the file using Ctrl+S or File > Save. The next time anyone opens this file, they will see a password prompt before the spreadsheet loads.
If you do not see Encrypt with Password, your version of Excel may use a different path. Try File > Info > Protect Workbook > Protect Workbook, or look for a Tools menu at the top with a Protect Sheet or Protect Workbook option. The exact wording varies by Excel version.
Protecting the entire file on Mac
Open the file in Excel and click the File menu at the top. Select Properties (not Info — Mac uses a different menu). A new window will open. Click the Security tab at the top of that window.
You will see two password fields: one labeled Password to open and another labeled Password to modify. If you want to lock the file completely, type a password in the Password to open field. If you want people to open it but not edit it, use Password to modify instead. Type your password, click OK, confirm the password when prompted, then save the file.
Protecting individual sheets while keeping the file open
You can lock specific sheets so people cannot edit them without a password, while leaving other sheets editable. This is useful when you share a file with collaborators who should only change certain parts. Open the file, right-click on the sheet tab at the bottom that you want to protect, and select Protect Sheet (Windows) or Protect Sheet (Mac).
A dialog will appear. Type a password if you want one — this password will be required to unprotect the sheet later. You can also choose what people are allowed to do: edit cells, insert rows, delete columns, and so on. Most of these are checked by default, meaning they are blocked. Leave them checked unless you specifically want to allow that action. Click OK, confirm your password, and save the file.
When someone tries to edit a protected sheet, they will see a message saying the sheet is protected and asking for a password. Unprotected sheets in the same file remain fully editable.
Hiding sheets and protecting them together
You can hide a sheet entirely so it does not appear in the sheet tabs at the bottom, then protect it so only someone with the password can unhide it. Right-click the sheet tab and select Hide. The sheet disappears from view. Then protect that sheet using the steps above — when you protect a hidden sheet, the protection also prevents unhiding it without the password.
This is stronger than protection alone because the sheet is not even visible. Someone would have to know the sheet exists and have the password to see it. To unhide a sheet, right-click any visible sheet tab, select Unhide, choose the hidden sheet from the list, and enter the password if one was set.
What happens when you forget the password
Excel does not have a password recovery feature. If you forget the password to open a file, you cannot open it. If you forget the password to modify a file, you cannot edit it. There is no back door, no recovery email, and no way to contact Microsoft to unlock it.
The only solution is to use a third-party tool designed to remove Excel passwords, but these tools are not always reliable and may not work on files encrypted with newer versions of Excel. Your best protection is to write the password down in a find location — a password manager, a locked drawer, or a trusted person — before you protect the file.
Testing your protection before sharing
After you protect a file, close it completely and reopen it to make sure the protection works as intended. Try entering the wrong password to confirm it rejects it. Try making an edit to a protected sheet to confirm the password prompt appears. This takes two minutes and prevents the frustration of discovering the protection does not work after you have already sent the file to someone else.
If you are protecting a file you plan to share, consider keeping an unprotected backup copy for yourself in a separate location. Password protection does not prevent file corruption, and if your only copy becomes damaged, you will not be able to recover it.
Frequently Asked Questions
Can I password-protect just one cell or range of cells?
Not directly. You can protect a sheet and then unlock the specific cells you want people to edit before explore the protection. Select the cells you want to remain editable, right-click, choose Format Cells, click the Protection tab, and uncheck Locked. Then protect the sheet — only the unlocked cells will be editable.
What if I want to let someone edit the file but not see all the data?
Hide the sheets containing sensitive data, then protect those sheets with a password. The hidden sheets will not appear in the sheet tabs, and only someone with the password can unhide them. People can still edit the visible sheets freely.
Does password protection work if someone makes a copy of the file?
Yes. The protection is part of the file itself, not tied to where it is stored. If someone copies a password-protected file, the copy remains password-protected. They cannot remove the protection without the password.
Can I change the password after I have already protected the file?
Yes. Unprotect the file or sheet using the current password, then protect it again with a new password. On Windows, go to File > Info > Protect Workbook and select the protection option again. On Mac, go to File > Properties > Security and change the password field.
Is password protection the same as encryption?
When you use Encrypt with Password in Excel, the file is encrypted, meaning the data is scrambled and unreadable without the password. Sheet protection is lighter — it prevents editing but does not encrypt the data itself. For sensitive information, use file-level encryption rather than sheet protection alone.