The fastest way to lock an Excel file
You can lock an Excel file in three ways, depending on what you want to prevent. The simplest is to save the file as read-only, which stops anyone from making changes without saving a copy first. The second is to protect the sheet, which lets people view and use formulas but blocks editing of specific cells you choose. The third is to encrypt the file with a password, which requires a password just to open it.
Most people use read-only for shared files where you want changes tracked, or sheet protection when you want others to fill in certain cells but not touch formulas or structure. Password encryption is strongest but also most inconvenient — the person opening the file has to type the password every time.
Key Takeaways
- Read-only mode stops edits without a password but lets anyone save a copy and edit that instead.
- Sheet protection locks specific cells or ranges while leaving others editable, and is broken by password if you set one.
- Password encryption requires a password to open the file at all, and there is no way to recover a forgotten password.
- Combining methods — for example, encrypting the file and then protecting the sheet inside it — gives you the most control.
Making a file read-only on Windows
Right-click the Excel file in File Explorer and select Properties. At the bottom of the General tab, check the box next to Read-only, then click Apply and OK. The next time anyone opens that file, Excel will warn them it is read-only and ask if they want to edit a copy instead.
This method works because Windows marks the file itself as read-only at the system level. The downside is that someone with write permission to the folder can uncheck that box and edit the original. It is a courtesy lock, not a security lock.
Making a file read-only on Mac
Open Finder, right-click the Excel file, and select Get Info. In the window that opens, check the box next to Locked near the bottom. Close the window. The file is now locked at the system level.
When someone tries to edit and save the file in Excel, they will see a message saying the file is locked and asking if they want to save a copy instead. Like the Windows method, this is a system-level lock that someone with folder permissions can undo by unchecking the box in Get Info.
Protecting a sheet so only certain cells can be edited
Sheet protection is useful when you want people to fill in specific cells — like a form or data entry template — but not change formulas, headers, or structure. Open your Excel file and go to the Review tab (or Sheet tab on Mac). Click Protect Sheet.
A dialog box will open. You can set a password here if you want, but it is optional. Below that, you will see a checklist of what people can do: select locked cells, select unlocked cells, format cells, insert rows, delete rows, and so on. By default, most of these are unchecked, which means they are blocked. Leave them as they are unless you want to allow something specific.
Before you protect the sheet, you need to unlock the cells you want people to edit. Select those cells, right-click, choose Format Cells, go to the Protection tab, and uncheck Locked. Then protect the sheet. Now only the unlocked cells can be edited.
Encrypting a file with a password
Password encryption is the strongest method because the file itself cannot be opened without the password. Go to File and select Info (on Mac, File then Properties). Look for a button or link that says Protect Workbook or Encrypt with Password. Click it and type your password twice.
Save the file. The next time anyone opens it — including you — Excel will ask for the password before showing any content. There is no way to recover a forgotten password, so write it down somewhere safe or use a password manager.
This method works on both Windows and Mac, though the exact menu location varies slightly between versions. If you cannot find the button, search the File menu for "encrypt" or "password".
Combining methods for stronger protection
You can use more than one method at once. For example, you could encrypt the file with a password so it cannot be opened without one, then protect the sheet inside so people can only edit certain cells. This means someone would need both the file password and the sheet password to make unwanted changes.
Another combination is to save the file as read-only and also protect the sheet. This creates friction at multiple levels: opening the file warns the person it is read-only, and if they save a copy and try to edit, the sheet protection blocks changes to locked cells.
What happens when someone tries to edit a locked file
If a file is read-only, Excel shows a message bar at the top saying "This file is read-only" with a button to edit a copy. The person can click that button and work on a copy, but the original stays unchanged.
If a sheet is protected, anyone trying to click on a locked cell will see a small popup saying the cell is protected and they cannot edit it. If they try to insert a row or delete a column, Excel will show a message that the sheet is protected and those actions are not allowed.
If the file is encrypted with a password, Excel simply will not open it without the correct password. The file appears as a locked document in Windows or Mac, and no preview or content is visible until the password is entered.
Frequently Asked Questions
Can I lock just one sheet in a workbook while leaving others editable?
Yes. Go to the sheet you want to lock, click the Review tab, and select Protect Sheet. Other sheets in the same workbook will remain unprotected. You can protect multiple sheets individually, each with its own password if you want.
What if I forget the password to my encrypted file?
There is no recovery option. Excel does not store passwords and cannot retrieve them. If you forget the password, the file cannot be opened. Use a password manager to store passwords you use on important files.
Can someone break sheet protection without the password?
Sheet protection without a password can be removed by someone with technical knowledge, but it requires tools outside Excel. If you set a password when protecting the sheet, it is much harder to bypass. Password encryption on the file itself is the strongest protection.
Does read-only mode prevent accidental changes?
Yes, it prevents accidental saves to the original file. Anyone who opens it will be prompted to save a copy instead. However, someone can deliberately uncheck the read-only flag in file properties if they have permission to the folder, so it is not tamper-proof.
Can I lock a file and still let people see it?
Yes. Sheet protection and read-only mode both let people view the file. Only password encryption on the file itself hides the content until the password is entered. If you want people to see the file but not edit it, use read-only or sheet protection.