Excel "file is locked for editing by another user": how to fix it
Excel shows this when a hidden owner file (~$ plus the workbook name) says someone already has the workbook open. Often that someone is you: Excel is still running in the background or crashed last time. Close Excel on every device, end any leftover Excel process in Task Manager (Force Quit on Mac), delete the ~$ file in the workbook's folder, then reopen.
What this message means
When Excel opens a workbook it creates a small hidden "owner file" in the same folder. The file is named ~$ followed by the workbook name (for example ~$Budget.xlsx) and records who has the workbook open. If another copy of Excel finds that file, it assumes someone is editing and offers the workbook read-only. Usually the dialog is titled "File in Use" and gives you Read Only, Notify and Cancel buttons. The name it shows might be a coworker, or it might be you. If it is you, a crash left the owner file behind, Excel is still running unseen, or the file is open on another device. If you share files through OneDrive or SharePoint, the lock can also mean someone's Excel version or file setup does not support co-authoring.
Common causes
| Cause | How to tell |
|---|---|
| Another person really has the workbook open | The dialog shows a coworker's name, and the workbook is in a shared network folder or shared OneDrive/SharePoint location. The lock goes away when they close it. |
| A leftover Excel process or an earlier crash left the owner file behind | The dialog shows your own name (or just "another user") even though you have no Excel windows open. Task Manager lists Excel under Processes, or you can see a ~$ file next to the workbook once hidden items are showing. |
| The file is still open on another of your devices or has not synced yet | It shows your name, and the file lives in OneDrive or SharePoint that you also open on a laptop, phone or Excel for the web. The lock often clears by itself a few minutes after you close it everywhere. |
| Someone's Excel version or the file setup blocks co-authoring | The file is on OneDrive or SharePoint, but only one person at a time can edit. Common reasons: someone uses Excel 2016, 2019 or 2021 (not Microsoft 365), the file is .xls or .csv, the workbook has a password or restricted access, or OneDrive sync is paused. |
| A file server is still holding a stale lock | The workbook is on a mapped drive or \\server\share path, the person named says they closed it (or has logged off), and deleting the ~$ file fails or it comes straight back. |
How to fix it
1. Check who has it open, then wait or open read-only
- Look at the name in the message. If it is a coworker, ask them to save and close the workbook.
- In the File in Use dialog, click Notify to open a read-only copy. Excel alerts you when the file is free and lets you switch to editing.
- If you can't wait, click Read Only, then use File > Save As to save your own copy under a new name and put your changes in that copy.
- In Excel for the web, if you only see "Viewing" in the upper right, select Viewing > Request more access to ask the owner for edit rights.
2. Close Excel everywhere and end hidden Excel processes
Windows 10 and 11; macOS
- Save your work and close every Excel window. Also close the file on any other computer, phone or browser tab where you had it open.
- Windows: press Ctrl+Shift+Esc to open Task Manager. On the Processes tab, select every Microsoft Excel (EXCEL.EXE) entry and click End task.
- Mac: press Option+Command+Esc, select Microsoft Excel and click Force Quit. You can also check Activity Monitor for a leftover Microsoft Excel process.
- If the file is on OneDrive or SharePoint, wait a few minutes so the server can release the lock.
- Reopen the workbook.
3. Delete the leftover ~$ owner file
Windows 11: View > Show > Hidden items. Windows 10: View tab > Hidden items. macOS Finder: Command+Shift+Period
- Make sure nobody has the workbook open and that no Excel process is running (see the previous fix).
- Open the folder that holds the workbook in File Explorer or Finder.
- Turn on hidden files. Windows 11: View > Show > Hidden items. Windows 10: the View tab > check Hidden items. Mac Finder: press Command+Shift+Period.
- Find the file whose name starts with ~$ and matches the workbook, for example ~$Budget.xlsx next to Budget.xlsx. Delete only that small file, never the workbook itself.
- If it isn't there, check C:\Users\<your name>\AppData\Local\Temp for a matching ~$ file. If you still can't see it, go to File Explorer Folder Options > View and clear Hide protected operating system files.
- Open the workbook again.
4. Clear the Office cache and check OneDrive sync
Excel for Microsoft 365 on Windows, files stored in OneDrive or SharePoint
- Click the OneDrive cloud icon in the taskbar and make sure sync is not paused. If it is, resume it.
- Install any pending OneDrive and Office updates (in Excel: File > Account > Update Options > Update Now).
- In Excel, go to File > Options > Save.
- Under Cache Settings, check Delete files from the Office Document Cache when they are closed, then click Delete cached files.
- Close Excel, then reopen the workbook from OneDrive or SharePoint.
5. Make the workbook co-authoring friendly so several people can edit
Windows paths shown; on Mac use Review > Protect Workbook, File > Restrict Permissions > No Restrictions, and Tools > Excel Add-ins
- Store the file in OneDrive, OneDrive for Business or SharePoint in Microsoft 365. Network drives, Dropbox, Box, Google Drive, local folders and SharePoint on-premises do not support co-authoring.
- Make sure everyone uses Excel for Microsoft 365 (Windows or Mac), Excel for the web or the mobile apps. One person on Excel 2016, 2019 or 2021 locks the file for everyone else.
- Save it as .xlsx, .xlsm or .xlsb with File > Save As (old .xls and .csv files can't be co-authored).
- Remove passwords or restricted access under File > Info > Protect Workbook.
- For tables or PivotTables with outside data, go to Table Design > Refresh > Connection Properties and clear Refresh data when opening the file.
- If the file is in a SharePoint library, have the site owner check that Require Check Out is turned off in the library settings.
6. Release a stale lock on a Windows file server
Workbooks on a Windows server share; needs admin rights on the server
- Confirm that the person named in the message has really closed Excel.
- On the server, open Computer Management (right-click Start > Computer Management).
- Go to System Tools > Shared Folders > Open Files.
- Find the workbook in the list, right-click it and choose Close Open File.
- Delete any leftover ~$ file for that workbook in the shared folder, then reopen it.
Next time, skip the search
Crade is an AI assistant for Mac and Windows that sees your screen. When a message like this pops up, ask “what does this mean?” and it explains the exact error in front of you, step by step.
Download CradeStill not fixed?
Restart the computer. That closes every hidden Excel process and releases any locks your own machine was holding. If the file is on OneDrive or SharePoint, open it in Excel for the web: there you can usually edit even when the desktop app says it is locked, and you can see who else is in the file. If a server share keeps producing locks nobody owns, ask your IT admin to check open-file sessions and your permissions on the folder (you need read, write and delete rights so Excel can remove its owner file). They can also move the workbook to OneDrive or SharePoint so it can be co-authored.
Questions people ask
Why does Excel say the file is locked for editing by me?
Excel found an owner file with your name on it. Either the workbook is still open on another device or in a background Excel process, or Excel crashed before it could delete the file. Close Excel everywhere, end leftover Excel processes, and delete the ~$ file next to the workbook.
Is it safe to delete the ~$ file?
Yes, as long as nobody has the workbook open. It is only a small marker file that records who opened the workbook, not your data. Delete only the file starting with ~$, never the workbook itself.
How do I see who has an Excel file open?
The File in Use dialog shows the name Excel recorded. For files on OneDrive or SharePoint, the people currently in the file appear at the top of the Excel window. On a Windows file server, an admin can check Computer Management > Shared Folders > Open Files.
How can two people edit the same Excel file at once?
Save it as .xlsx, .xlsm or .xlsb in OneDrive or SharePoint in Microsoft 365, and have everyone use Excel for Microsoft 365, Excel for the web or the mobile apps. Files on network drives or opened in Excel 2016, 2019 or 2021 allow only one editor at a time.
What does the Notify button do?
It opens a read-only copy and tells you when the other person closes the workbook. Excel then offers to switch you to an editable version.
Sources
- Excel file is locked for editing (Microsoft Support)
- "The document is locked for editing by another user" error message (Microsoft Support)
- Excel file locked for editing by myself (Microsoft Q&A)
- Excel #CALC! error: what it means and how to fix it
- Excel can't insert new cells (push non-empty cells off worksheet): fix
- Excel "There are one or more circular references": how to fix
- Excel #DIV/0! error: what it means and how to fix it
- Excel "file format or file extension is not valid": how to fix it
- Excel #GETTING_DATA: what it means and how to fix it