The fastest way: use "Protect Sheet" for most situations

If you want to stop someone from editing your spreadsheet without your permission, open the file in Excel, go to the Review tab at the top, and click Protect Sheet. A dialog box appears asking you to type a password twice. Type it, click OK, and you're done — the sheet is now locked.

This method protects the data inside the sheet. Anyone who opens the file can see what's in it, but they cannot change cell values, delete rows, insert columns, or modify formulas without entering your password first. If someone tries to edit a cell, Excel will ask for the password before allowing the change.

The password you set here is separate from the file password — it only locks the contents of that particular sheet. If your workbook has multiple sheets, you can protect each one with a different password or the same one.

Key Takeaways

  • Protect Sheet (Review tab) stops people from editing cells, but they can still open and read the file — use this when you want to share data without letting others change it.
  • Encrypt with Password (File menu) locks the entire file so it cannot be opened without the password — use this when the file itself must stay private.
  • Excel passwords are not recoverable if you forget them, so write it down somewhere safe before you close the file.
  • Protecting a sheet is not the same as encrypting a file — one stops editing, the other stops opening.

Encrypting the whole file so it cannot be opened without a password

If you need the file itself to be private — so nobody can even open it to see what's inside — use file encryption instead. Click File in the top left, then Info, then Protect Workbook, then Encrypt with Password. Type your password twice and click OK.

Now the file is encrypted. The next time someone tries to open it, Excel will ask for the password before showing any content. Without the correct password, the file cannot be opened at all — not even to view it.

This is stronger protection than Protect Sheet because it secures the entire file, not just the contents. Use this when the spreadsheet contains sensitive information that should not be visible to anyone without permission.

The difference between sheet protection and file encryption

Sheet protection and file encryption do two different things. Protect Sheet lets people open the file and read it, but prevents them from making changes. Encrypt with Password prevents the file from being opened at all without the password.

Choose sheet protection if you want to share a spreadsheet with coworkers who need to see the data but should not edit it. Choose file encryption if the spreadsheet itself must stay private and only certain people should be able to open it.

You can use both at the same time — encrypt the file so it cannot be opened without a password, and also protect the sheet so that even someone with the password cannot edit the cells. This gives you two layers of security.

What happens when someone tries to edit a protected sheet

When sheet protection is on and someone tries to change a cell, Excel shows a message saying the sheet is protected and asks for a password. They cannot proceed without entering the correct password. If they enter the wrong password, the cell remains locked and they cannot make the change.

The person can still copy data from the sheet, print it, and use it in calculations — they just cannot modify the original file. If you want to prevent copying as well, you can set additional options when you turn on sheet protection, though this is less common.

Removing or changing a password you set

To turn off sheet protection, go to the Review tab and click Unprotect Sheet. Excel will ask for the password. If you enter it correctly, the sheet is unlocked and anyone can edit it again.

To change a file encryption password, go to File, Info, Protect Workbook, Encrypt with Password again. Type a new password and click OK. The old password no longer works.

If you forget the password, Excel cannot recover it for you. There is no "forgot password" option and no way to bypass it. Write down your password and store it somewhere safe before you close the file.

Common mistakes when setting passwords

The most common mistake is forgetting the password after you set it. Excel does not store a copy and cannot retrieve it. Before you close the file, write the password down or store it in a password manager you trust.

Another mistake is confusing sheet protection with file encryption and thinking one does what the other does. If you want the file to be unreadable without a password, use encryption. If you want people to be able to read it but not change it, use sheet protection.

A third mistake is setting a password and then forgetting which sheets are protected. If your workbook has many sheets, write down which ones are locked and what password protects them, especially if different sheets use different passwords.

Passwords in Excel on Mac and online versions

On Mac, the steps are almost identical. Open the file, go to Review, click Protect Sheet, and enter your password. For file encryption on Mac, go to File, Properties, Security, and check the box to encrypt the file with a password.

Excel Online (the web version) does not support sheet protection or file encryption the same way the desktop version does. If you need password protection, read the file, protect it in the desktop version of Excel, and then upload it back to OneDrive or SharePoint. The protection will stay in place when others open it online.

Frequently Asked Questions

Can someone break an Excel password?

Excel passwords are not military-grade encryption. Someone with technical skill and specialized software could potentially break an older Excel password, especially if it is short or straightforward. For highly sensitive data, use strong passwords (mix of letters, numbers, and symbols) and consider additional security measures like storing the file on an encrypted drive.

If I protect a sheet, can people still see the formulas in the cells?

Yes, they can see the formulas in the formula bar at the top of Excel. Sheet protection prevents them from editing the formulas, but not from viewing them. If you want to hide formulas from view, you must format the cells as hidden before you turn on sheet protection, then protect the sheet so the hidden formatting cannot be changed.

What if I encrypt a file and then forget the password?

The file cannot be opened. Excel does not have a password recovery option. There is no way to retrieve or reset the password. Keep your password written down in a safe place, or use a password manager to store it.

Can I protect different sheets with different passwords?

Yes. Go to each sheet, click the Review tab, select Protect Sheet, and enter a different password for each one. Each sheet can have its own password, or you can use the same password for all of them.

Does password protection work if someone saves the file with a different name?

Yes. The protection is part of the file itself, not the filename. If someone saves a protected sheet under a new name, it remains protected. They still need the password to edit it.