Password protection in Excel works differently depending on what you want to lock

Excel gives you three separate ways to password protect a file, and they do different things. You can require a password to open the file at all. You can require a password to edit it (but let people view it without one). Or you can lock specific cells or sheets so people can open and edit the file, but cannot change certain parts. Most people want the first option — a password to open the file — but understanding all three helps you pick what actually solves your problem.

The steps differ slightly between Windows and Mac, and between older and newer versions of Excel. This guide covers Excel 2016 and later on both systems, which is what most people use. If you have an older version or use Excel Online (the free web version), some steps will look different, but the basic idea is the same.

Key Takeaways

  • To require a password before anyone can open your file, use File > Info > Protect Workbook > Encrypt with Password on Windows, or File > Properties on Mac.
  • To let people open the file but require a password to edit it, use File > Info > Protect Workbook > Protect Current Sheet or Protect Workbook Structure.
  • If you forget the password, there is no built-in recovery — write it down or store it in a password manager before you close the file.
  • Password protecting a file does not back it up; keep a separate copy in case the file becomes corrupted.
  • Locking individual cells or sheets requires both setting a password and then protecting the sheet, or the locks do nothing.

How to password protect a file so people cannot open it without the password

On Windows: Open your Excel file. Click File in the top left. Click Info. Look for a button called Protect Workbook (it may say "Protect Workbook" or show a shield icon). Click the dropdown arrow next to it and select Encrypt with Password. A dialog box will appear asking you to enter a password. Type your password, click OK, then type it again to confirm. Click OK again. Save the file — you must save it for the password to take effect. The next time anyone opens this file, Excel will ask for the password before showing the spreadsheet.

On Mac: Open your Excel file. Click File in the top menu. Click Properties (not Info — Mac uses Properties). Click the Security tab. Check the box next to "Require password to open". Enter your password in the field below it. Click OK. Save the file. The password is now active.

This method encrypts the entire file. Without the correct password, the file cannot be opened at all — not even to view it. This is the strongest protection and the one most people need.

How to let people view the file but require a password to make changes

If you want to share a file and let people see it without a password, but prevent them from editing it without one, use a different protection method. Open your Excel file. Click File, then Info. Click Protect Workbook and select Protect Current Sheet (if you want to protect just one sheet) or Protect Workbook Structure (if you want to protect the entire workbook and prevent people from adding, deleting, or rearranging sheets).

A dialog box will appear. Enter a password if you want one — this is optional for sheet protection, but recommended. Click OK and confirm the password. Save the file. Now when someone opens the file, they can view all the data and read formulas, but if they try to edit a cell, Excel will ask for the password. This is useful when you want to share a template or a report that people should not modify.

How to lock specific cells or columns so only you can change them

If you want some cells to be editable and others locked, you need to do two things: first unlock the cells you want people to edit, then protect the sheet. By default, all cells in Excel are marked as locked, but that lock does nothing until you protect the sheet.

Select the cells you want people to be able to edit. Right-click and choose Format Cells (or press Ctrl+1 on Windows, Command+1 on Mac). Click the Protection tab. Uncheck the box next to Locked. Click OK. Now select all cells (Ctrl+A or Command+A), right-click, choose Format Cells, go to Protection, and make sure Locked is checked — this locks everything except the cells you just unlocked. Then protect the sheet: click File, Info, Protect Workbook, Protect Current Sheet. Enter a password if you want one. Click OK. Save the file.

Now people can edit only the cells you unlocked. Everything else is protected. If you did not set a password, people can unprotect the sheet themselves by going to the same menu and clicking Unprotect Sheet, so use a password if you want real protection.

What happens if you forget the password

Excel does not have a built-in password recovery tool. If you forget the password to open a file, you cannot open it. If you forget the password to edit a protected sheet, you cannot edit it. There is no "reset password" button and no way to contact Microsoft to recover it.

Before you close a file for the first time after adding a password, write the password down or store it in a password manager like Bitwarden, 1Password, or the password manager built into Windows or Mac. If you lose the password, your only option is to use a third-party tool designed to crack Excel passwords, which may or may not work depending on which version of Excel you used and how strong your password is.

How strong should your password be

Excel passwords work best when they are at least 8 characters long and include uppercase letters, lowercase letters, numbers, and symbols. A password like "Budget2024!" is stronger than "password" or "12345678". Avoid using words from the dictionary or personal information like birthdays or names.

If this file contains sensitive information — financial data, medical records, personal details — treat the password like you would treat a password for your bank account. Do not share it in email or text messages. Do not write it on a sticky note on your monitor. If you need to share the file with someone, send the file and password through separate channels, or use a password manager that both of you have access to.

Protecting a file does not replace backing it up

Password protection keeps people out, but it does not protect your file from being lost or corrupted. If your hard drive fails, your file is gone, password or not. If the file becomes corrupted and will not open, the password does not matter because you cannot access the file anyway.

Keep a backup copy of your important Excel files in a separate location — on an external drive, in cloud storage like OneDrive or Google Drive, or both. Test that you can actually open the backup file before you delete the original. This way, if something goes wrong, you have a copy to fall back on.

Frequently Asked Questions

Can I password protect just one sheet in a workbook, not the whole file?

Yes. Click File, Info, Protect Workbook, then Protect Current Sheet. This protects only the sheet you are on. Other sheets in the same workbook remain unprotected. You can set different passwords for different sheets if you want, though most people use the same password for all sheets in one file.

What if I want to let someone edit the file but not see certain columns?

Excel does not have a built-in way to hide columns from someone who has the password to edit the sheet. If you protect a sheet, you can lock certain cells so they cannot be edited, but anyone who can edit the sheet can still see all columns. If you need to truly hide data, consider splitting the file into separate workbooks or using a different tool like a database.

Does password protecting an Excel file work on Google Sheets or other spreadsheet programs?

No. If you save an Excel file with a password and then open it in Google Sheets, the password protection is removed. Google Sheets has its own sharing and permission system, but it does not recognize Excel passwords. If you need to use the file in multiple programs, test it in each one before relying on the password protection.

Can I remove a password from a file if I still remember it?

Yes. Open the file and enter the password. Then go to File, Info, Protect Workbook, and click Encrypt with Password (Windows) or Properties > Security (Mac). Delete the password from the field, leaving it blank. Click OK and save the file. The password is now removed.

Is password protecting an Excel file the same as encrypting it?

When you use Encrypt with Password in Excel, the file is both password protected and encrypted — meaning the data inside is scrambled so it cannot be read without the password. When you protect a sheet, you are only preventing edits, not encrypting the data. Someone with technical knowledge could potentially extract data from a sheet-protected file, but they cannot open an encrypted file without the password.