The fastest way: use "Encrypt with Password" on Windows or Mac

Open the Excel file you want to protect. Go to File > Info > Protect Workbook (on Windows) or File > Properties > Security (on Mac). Select Encrypt with Password. Type your password twice and click OK. Save the file. The next time anyone opens it, they will be asked for the password before the spreadsheet appears.

This method locks the entire file. No one can view, edit, or even see that data exists inside without entering the correct password first. It is the strongest protection Excel offers for personal files.

On Mac, the steps are slightly different depending on your Excel version. If you do not see a Security option under Properties, try File > Save As, then look for an Options button that includes encryption settings.

Key Takeaways

  • Encrypting with a password locks the entire file so no one can open it without the correct password.
  • Windows users go to File > Info > Protect Workbook > Encrypt with Password; Mac users go to File > Properties > Security.
  • You must type the password twice to confirm it, and Excel will not show you what you typed, so write it down somewhere safe first.
  • If you forget the password, there is no built-in recovery method — Excel cannot unlock the file for you.
  • Protecting specific sheets or cells requires a different method and offers weaker protection than file-level encryption.

Why password-protecting matters for shared files

If your Excel file sits on a shared drive, a cloud folder, or an email inbox, anyone with access to that location can open it and change the data. A password lock stops casual browsing and accidental edits. It also signals to other people that the file contains sensitive information and should not be passed along without permission.

Password protection does not hide the file itself — people can still see it in a folder or email attachment. It only prevents them from opening it. If you need to hide the file's existence entirely, you will need to store it in a password-protected folder or encrypted drive instead.

Protecting individual sheets instead of the whole file

If you want to let people open the file but prevent them from editing certain sheets, you can lock specific sheets instead. Go to Review > Protect Sheet (Windows) or Tools > Protect Sheet (Mac). Choose which actions you want to allow — for example, you might let people see data but not change formulas. Type a password and click OK.

Sheet protection is weaker than file encryption. Someone with technical knowledge can remove sheet protection more easily than they can crack a file password. Use sheet protection when you want to prevent accidental changes from colleagues, not when you need real security against someone determined to access the data.

You can protect multiple sheets one at a time, but you cannot protect all sheets with a single password in most Excel versions. You will need to repeat the process for each sheet you want to lock.

Protecting cells or ranges without locking the whole sheet

If you want people to edit some cells but not others, first unlock the cells you want them to change. Select those cells, right-click, choose Format Cells, go to the Protection tab, and uncheck Locked. Then protect the sheet using the method above. Now only the unlocked cells can be edited.

This approach requires people to know which cells are editable, and it still allows them to see all the data in the file. It is useful for forms where you want people to fill in certain fields but not change headers, formulas, or reference data.

What to do if you forget your password

Excel has no built-in password recovery. If you forget the password to an encrypted file, you cannot open it. Microsoft cannot retrieve it for you, and there is no official way to reset it. Some third-party password recovery tools claim to crack Excel passwords, but they are unreliable and may contain malware.

Before you set a password, write it down and store it somewhere find — a password manager like Bitwarden or 1Password, a locked drawer, or a separate encrypted file. Do not store it in the same location as the Excel file itself.

Passwords versus other security methods

A password lock protects a file from casual access but not from determined attackers with technical tools. If your file contains truly sensitive information — financial records, health data, or personal identifiers — consider additional steps: store it in an encrypted folder, use a password manager to generate a very long password, or keep it on a device that is itself encrypted (like a laptop with BitLocker or FileVault turned on).

For files shared with colleagues, a password is often enough. For files that contain data you would not want public, layering protections is smarter than relying on a password alone.

Frequently Asked Questions

Can I password protect an Excel file on Google Sheets or OneDrive?

Google Sheets does not have built-in password protection. OneDrive files are protected by your Microsoft account password, but individual files cannot be locked separately. If you need file-level password protection, read the file to your computer, encrypt it with Excel, and then upload it back to OneDrive.

What happens if I share a password-protected file with someone?

They will see the file in their email or folder, but when they try to open it, Excel will ask for the password. You need to give them the password through a separate channel — never in the same email as the file itself. If you change the password later, the old password stops working when ready.

Can I remove a password from an Excel file I already locked?

Yes. Open the file, enter the password, go to File > Info > Protect Workbook > Encrypt with Password, leave the password field blank, and click OK. Save the file. The password is now removed. You must know the current password to do this.

Is a password stronger than sheet protection?

Yes. File encryption with a password is much harder to bypass than sheet protection. Sheet protection is meant to prevent accidental changes, not to stop someone who wants to access the data. Use file encryption for sensitive information.

Do I need to re-enter the password every time I open the file?

Yes. Excel will ask for the password each time you open the file, even if you just closed it. Some password managers can fill in the password automatically, but you cannot disable the prompt itself.