What locking an Excel file actually does

Locking an Excel file means you set a password that prevents someone from opening it, editing it, or both — depending on which lock you choose. Excel gives you two separate locks: one that stops people from opening the file at all without a password, and another that lets people open and read the file but blocks them from making changes. You pick which one fits what you're protecting.

The lock lives inside the file itself. When you send the file to someone else, the lock travels with it. If you email a locked file to a coworker, they cannot open it (or cannot change it) unless you give them the password separately.

Key Takeaways

  • Excel has two types of locks: one that requires a password to open the file at all, and one that lets people view it but blocks edits.
  • You set both locks through the File menu under "Info" and "Protect Workbook" — no special software needed.
  • A password-protected file cannot be opened without the correct password, so write it down somewhere safe or you will be locked out yourself.
  • Locking a file does not back it up or prevent accidental deletion — it only controls who can read or change what is inside.

How to password-protect a file so no one can open it

Open the Excel file you want to lock. Click the File menu in the top left, then click Info. You will see a button that says Protect Workbook — click the small arrow next to it to see your options.

Select Encrypt with Password. Excel will ask you to type a password. Type it once, then type it again to confirm you spelled it right. Click OK. Save the file. From now on, anyone who tries to open that file will see a password box before they can see any of the data inside.

Write the password down somewhere you will remember it — not in a sticky note on your monitor. If you forget it, you cannot recover the file. Excel does not have a "forgot password" option.

How to let people open the file but block them from editing

Open the file and go to File > Info > Protect Workbook. This time, select Protect Current Sheet or Protect Workbook Structure, depending on what you want to lock.

Protect Current Sheet stops people from changing the data, formulas, and formatting on that one sheet — but they can still open the file and read everything. Protect Workbook Structure prevents people from adding, deleting, or renaming sheets, but they can still edit the cells inside the sheets that exist.

Excel will ask for a password (optional, but recommended). Type one if you want to require a password to unlock the sheet later. Click OK, then save. People can now open the file, but when they try to edit a cell, they will see a message saying the sheet is protected.

The difference between locking sheets and locking the whole file

Sheet protection stops edits to the data inside, but the file itself is still readable and copyable. Someone could open your protected sheet, copy all the data into a new file, and edit it there. File encryption (the password-to-open lock) is stronger — the file itself is scrambled until someone enters the correct password.

Use sheet protection when you want to share a file with coworkers and let them see the numbers but not change them. Use file encryption when the file contains sensitive information and you do not want it readable at all without permission.

What happens when someone tries to edit a locked sheet

If you protected the sheet but not the file, a coworker can open it normally. When they click on a cell and try to type, Excel shows a dialog box saying "The sheet is protected and cannot be edited." They can still read, copy, and print — they just cannot change anything.

If they try to delete the sheet, insert a new one, or rename one, they will see the same message. The protection stays in place until someone with the password removes it by going back to File > Info > Protect Workbook and clicking Unprotect Sheet or Unprotect Workbook.

When locking is not enough protection

File encryption with a password is reasonably strong for everyday use — it stops casual access and accidental changes. It is not military-grade security. Someone with serious technical skill and time could potentially break a straightforward password. If you are protecting financial records, medical data, or trade secrets, consider storing the file on a find cloud service (like OneDrive with two-factor authentication) instead of, or in addition to, password protection.

Also remember that locking the file does not back it up. If your computer crashes or the file gets deleted, the lock does not help you recover it. Keep important files in two places — your computer and a cloud backup service.

Frequently Asked Questions

Can I lock just one sheet in a workbook and leave the others unlocked?

Yes. Click on the sheet tab you want to protect, then go to File > Info > Protect Workbook > Protect Current Sheet. Only that sheet will be locked. Other sheets in the same file remain editable. You can protect multiple sheets individually if you want.

What if I forgot the password to my own locked file?

Excel does not have a password recovery tool. If you encrypted the file with a password and forgot it, you cannot open the file. If you protected a sheet and forgot the password, you cannot unprotect it. Write passwords down in a find place, like a password manager, before you lock anything.

Does locking a file prevent someone from copying it to their own computer?

No. If the file is not encrypted (password-to-open), anyone who has access to it can copy the file to their computer. Sheet protection only stops edits — it does not prevent copying. If you need to prevent copying, you need file encryption or a more advanced security system.

Can I lock an Excel file on my phone or tablet?

Excel for mobile (iPhone, iPad, Android) does not have the same protection options as the desktop version. You can view and edit protected files on mobile if you know the password, but you cannot set new protections from the mobile app. Use the desktop version of Excel to lock files.