Excel guide · 4 min read
Excel file is locked for editing: how to fix it
Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | |
|---|---|---|---|
| 1 | What you see | Likely cause | First thing to try |
| 2 | Locked by a colleague's name | They have it open | Notify, or ask them to close it |
| 3 | Locked by your own name | Open in another window or a stuck Excel | Close Excel fully, check Task Manager |
| 4 | Locked by "another user" | Leftover ~$ owner file | Show hidden items, delete the ~$ file |
| 5 | Locked right after previewing | File Explorer preview pane | Turn off the preview pane |
| 6 | Locked on a shared drive every day | Several people editing one copy | Move it to OneDrive or SharePoint |
What the message means
When you open a workbook from a shared folder, Excel creates a small hidden owner file next to it, named like the workbook with ~$ in front (for Budget.xlsx, ~$Budget.xlsx). It records who has the file open. The next person to open the workbook sees the owner file and gets File in Use: the file is locked for editing by that name.
You then have three choices. Read Only opens it so you can look but not save over the original. Notify also opens it read-only, and pops up File Now Available when the other person closes it, with a Read-Write button to switch over. Cancel does nothing. The name in the message is the best clue, so read it before you click.
1. A colleague really has it open
If the message names someone else, it's working as designed: two people saving over the same file on a network drive would overwrite each other's changes. Ask them to save and close, or click Notify and carry on with something else.
Avoid editing a read-only copy and saving it under a new name to merge later. You end up with two versions and someone has to copy changes across by hand. If people often need the file at the same time, see fix 6.
2. It's locked by you
If the message shows your own name, the file is open somewhere you've forgotten: another Excel window, another PC you're signed in to, or an Excel process that didn't close properly after a crash. Excel can keep running in the background with no window, holding the file open.
- Save your work and close every Excel window.
- Press Ctrl+Shift+Esc to open Task Manager.
- On the Processes tab, look for Microsoft Excel. If it's still listed, select it and click End task.
- Open the workbook again. If you use another PC, close Excel there too.
3. Nobody has it open: the leftover ~$ owner file
If Excel crashed or the PC lost power, the owner file can be left behind, and Excel keeps saying the file is locked, sometimes by "another user", even when it's closed everywhere. Owner files are hidden, so you need to show them first.
Only delete the ~$ file once you're sure nobody has the workbook open. Deleting it doesn't harm the workbook itself; it's just the lock note.
- In File Explorer, open the folder that holds the workbook.
- Choose View > Show > Hidden items (in Windows 10, tick Hidden items on the View tab).
- Find the file that starts with ~$ and matches the workbook's name, such as ~$Budget.xlsx.
- Delete it, then open the workbook again.
4. File Explorer's preview pane is holding it
If you clicked the file in File Explorer with the preview pane open, Windows may have opened it to draw the preview and kept it busy. Then Excel says it's locked, often by your own name.
Turn the preview pane off with View > Preview pane, or press Alt+P in File Explorer. Click a different file, wait a few seconds, and open the workbook again.
5. It keeps happening on a shared drive: co-author instead
A workbook on an ordinary network drive can only be edited by one person at a time. Save it to OneDrive, SharePoint or a Teams channel instead, and several people can edit it at once, each seeing the others' changes. That's co-authoring, and it needs Excel for Microsoft 365 or Excel for the web.
A few things block it. The file must be .xlsx, .xlsm or .xlsb; an old .xls file still locks, so use File > Save As to change the type. Open it from OneDrive or SharePoint, through Excel or the browser, not from an email attachment, which is a separate copy. And if the workbook uses the old Shared Workbook feature, turn that off first, because it can't be co-authored.
With co-authoring, AutoSave is on by default and saves every few seconds. That's also your safety net: if someone breaks something, File > Info > Version History lets you open or restore an earlier version.
Common mistakes
Clicking Read Only, editing, and saving a copy to merge later
Click Notify and wait, or move the file to OneDrive or SharePoint so you can both edit.
Deleting the ~$ file while a colleague has the workbook open
Check the name in the message first. Only delete the owner file when nobody has it open.
Emailing the workbook around so everyone can edit
Each attachment is a separate copy. Share a link to one file in OneDrive or SharePoint instead.
FAQ
Why does Excel say a file is locked by me?
It's still open in another Excel window, on another PC, or in an Excel process left running after a crash. Close Excel everywhere and end any Microsoft Excel process in Task Manager.
How do I unlock an Excel file locked by another user?
Ask them to close it, or click Notify to get a message when it's free. If nobody has it open, delete the hidden ~$ owner file in the same folder.
Can two people edit an Excel file at the same time?
Yes, if the file is saved in OneDrive, SharePoint or Teams as .xlsx, .xlsm or .xlsb, and everyone uses Excel for Microsoft 365 or Excel for the web.
Is "locked for editing" the same as a protected sheet?
No. A locked file is about who has it open right now. A protected sheet stops edits to certain cells for everyone, and Review > Unprotect Sheet removes it.
Related guides
- How to share an Excel file so multiple users can edit it at once
- How to remove read-only from an Excel file
- How to recover an unsaved Excel file
- Fix "Excel cannot open the file because the file format or file extension is not valid"
- Excel copy and paste not working: 7 causes and fixes
Updated