Excel file is locked for editing by another user: how to fix it

Quick answer: Excel shows this message when it believes someone already has the workbook open for editing, so it offers you a read-only copy instead. Often that someone is you: the file is still open on another PC or in another session, or a crash left a hidden ~$ owner file or a background EXCEL.EXE process behind. Close the file everywhere, end any leftover Excel process in Task Manager, wait a few minutes, and try again. If several people need to edit at once, store the workbook in OneDrive or SharePoint in Microsoft 365 and make sure everyone uses a version of Excel that supports co-authoring.

Applies to: Excel for Microsoft 365 and Excel 2016, 2019, 2021 and 2024 on Windows 11 and 10. Most of the advice also fits Word and PowerPoint, which use the same locking method. The steps follow Microsoft’s article on the Excel file is locked for editing error, with notes on where each one helps and where it doesn’t.

What the message means

The usual wording is “filename is locked for editing by name“, sometimes with “another user” in place of a name. Below it, Excel offers to open the workbook read-only or to notify you when it becomes free. Nothing is wrong with the workbook itself. Excel is protecting it from two people saving different changes over each other.

For files in ordinary folders and on network shares, Excel keeps track of who has a workbook open with a small hidden file in the same folder. Its name is the workbook’s name with ~$ at the front, for example ~$Budget.xlsx. Microsoft’s Excel support team calls this the owner file and explains in an archived post about locked files that it only records the name of the person who has the file open. If Excel loses its connection to the file, for example when the file server restarts while the workbook is open, the owner file may not be deleted. The next person to open the workbook then sees a stale name, or just “another user”.

Files in OneDrive or SharePoint work differently. There the cloud service can let several people edit together, but only when every editor and the file itself meet the co-authoring requirements in Fix 5. If one of them doesn’t, everyone may see the locked message.

Which fix fits your situation?

What you seeLikely causeStart with
Your own name in the messageFile open on another device or a session that didn’t closeFix 2, then Fix 3
A colleague’s name, and they really have it openNormal lockFix 1
“Another user”, a blank name or someone who left hours agoStale owner file after a crashFix 4
File is in OneDrive or SharePoint and two people need to editCo-authoring requirement not metFix 5
SharePoint library shows a red check-out markFile checked outFix 6
File is on a company file serverOpen handle on the serverFix 7

1. Choose Read Only, Notify or a copy

If the person named in the message really is working in the file, the lock is doing its job. The dialog gives you these choices:

  • Read Only: opens the last saved version so you can read it, copy data out or print. You can’t save changes to the original.
  • Notify: also opens a read-only copy, and Excel tells you when the other person closes the workbook so you can switch to editing. This is the better choice when you only need to wait a short time.
  • Cancel: closes the dialog. Ask the person to close the file, or, in OneDrive or SharePoint, to share it with edit access.

If you can’t wait, Microsoft’s advice for a file locked by another user is to save your own copy with File > Save As (or Save a Copy in Excel for Microsoft 365 when AutoSave is on) and make your changes there. You will then have to bring those changes into the original by hand once it’s free, so keep a note of which cells you changed. For files in OneDrive or SharePoint, version history is a safety net if two copies get mixed up; our guide on restoring a version from OneDrive or SharePoint shows how it works, and the steps are the same in Excel.

2. When the other user is you

Seeing your own name is common. Microsoft lists two reasons: the workbook is open on another device, or an earlier session didn’t close properly. Typical examples are a laptop and a desktop signed in to the same account, a Remote Desktop session you disconnected from instead of signing out, or Excel open on your phone.

  1. Close the workbook on every device and session where you might have it open, including Excel on a phone or tablet and any browser tab with Excel for the web.
  2. If the file is in OneDrive or SharePoint, wait a few minutes. Microsoft says the server may need that long to release the lock after you close the file.
  3. Restart your PC if the message keeps showing your name. This closes any Excel process you can’t see and releases the file handles it held.

3. End a leftover Excel process

When Excel crashes or you close its window while it is still busy, EXCEL.EXE can keep running in the background with the workbook open. Excel then sees its own lock and blames “another user”.

Warning: ending Excel throws away anything that wasn’t saved in every open workbook. Save and close the workbooks you can first.

  1. Press Ctrl + Shift + Esc to open Task Manager. Select More details if you see only a short list.
  2. On the Processes tab, look for Microsoft Excel under Apps and also under Background processes. The Details tab lists the same program as EXCEL.EXE.
  3. Select each Excel entry and choose End task.
  4. Open the workbook again from its usual location.

If Excel was frozen rather than crashed, it may lock up again as soon as you reopen the file; work through our guide to Excel not responding before you go further. In the same archived post, Microsoft’s Excel team also notes that the File Explorer Preview pane can keep a file open, so close that pane (or the Details pane) if the lock returns after you only clicked the file.

4. Delete a stale owner file

Use this fix when the message names someone who has definitely closed the file, shows “another user” or a blank name, and Fix 2 and Fix 3 didn’t help. It applies to workbooks on your PC, a USB drive or a network share, not to files you open from OneDrive or SharePoint in the browser.

Warning: first make sure nobody really has the workbook open. If you delete the owner file while a colleague is editing, Excel loses track of them, and two people can end up saving over each other’s work.

  1. Close Excel.
  2. In File Explorer, open the folder that contains the workbook.
  3. Show hidden files. In Windows 11, select View > Show > Hidden items. In Windows 10, open the View tab and tick Hidden items.
  4. Look for a file whose name starts with ~$ followed by the workbook’s name, for example ~$Budget.xlsx.
  5. Delete that file only, then open the workbook again.

If Windows says the owner file is in use and won’t delete it, a process still has the workbook open. Go back to Fix 3 on your own PC, or Fix 7 if the file is on a server. On a shared drive you may also lack permission to delete files; ask the person who manages the share.

5. Set the file up for co-authoring

If people regularly need to edit the same workbook at the same time, removing locks one by one won’t solve it. Co-authoring lets several people edit together, and Microsoft’s co-authoring requirements for Excel are strict. Check each point:

  • Location: OneDrive, OneDrive for work or school, or a SharePoint library in Microsoft 365. Network paths, local folders, other cloud services such as Dropbox, Box or Google Drive, and SharePoint On-Premises sites don’t support co-authoring.
  • Excel version: everyone must use Excel for Microsoft 365 (Windows or Mac), Excel for the web, or Excel on Android or iOS, signed in with a Microsoft 365 account. Excel 2016, 2019 and 2021 don’t co-author. Microsoft warns that a single person in an unsupported version can cause the locked error for everyone. If you aren’t sure what a colleague has, ask them to open the file in Excel for the web.
  • AutoSave: the switch in the top-left corner should be on for files in OneDrive or SharePoint. It sends changes to the cloud within seconds, and Microsoft notes that everyone needs AutoSave on to see each other’s selections in the desktop app.
  • File format: .xlsx, .xlsm or .xlsb. Microsoft says the Strict Open XML Spreadsheet format isn’t supported, and other types such as older .xls or CSV files aren’t on the list either. Convert with File > Save As > Browse and pick the type under Save as type.
  • OneDrive sync app: if people open the file from a synced folder in File Explorer, the OneDrive app should be up to date and not paused. If you paused it earlier, resume it; our guide on pausing OneDrive sync shows where that setting is.

Microsoft also lists features that block co-authoring. Remove them, or keep them in a separate workbook that only one person edits:

  • The legacy Shared Workbook feature. Turn it off first.
  • Password encryption or restricted access, set under File > Info > Protect Workbook.
  • Refresh data when opening the file on a table or PivotTable. Select it, open Connection Properties from the Refresh menu on the Table Design or PivotTable Analyze tab, and clear the option.
  • An add-in that interferes. Turn it off under File > Options > Add-ins, choose Excel Add-ins next to Manage, select Go and clear its check box.

If you opened a SharePoint snapshot of the workbook, open the workbook itself instead; Microsoft names snapshots as another cause.

6. Check in a SharePoint file

Some SharePoint libraries use check-out. A checked-out file can be edited only by the person who checked it out, so everyone else gets a read-only copy. Check-out and co-authoring don’t mix: Microsoft’s SharePoint check-out guide says not to check files out when several people need to edit at once.

  • See who has it: in the library, a small red circle with a check mark next to the file name means it is checked out. Point at the file name to see who has it.
  • If it’s you: in desktop Excel, go to File > Info > Check In, add a comment and select OK. In the library, select the file, open the More menu (the three dots) and choose Check in. If you didn’t change anything, choose Discard check out instead.
  • If it’s someone else: ask them to check it in. If they’re away and you have enough permission, usually as a site owner, you can check it in yourself from the More menu and confirm the warning. Their unsaved changes are lost, so try to reach them first.

If the library requires check-out, you can’t turn it off yourself; ask the site owner whether the library should allow co-authoring instead.

7. Close the file on a network share (admins)

On a Windows file server, the server keeps a list of open files. When a user’s PC crashed or lost its network connection, the server can still hold the workbook open for them. An administrator on the server can close it.

Warning: closing an open file can make the person who has it open lose unsaved work. Microsoft’s own instructions say to warn connected users before you do it.

  1. On the file server, open Computer Management (right-click Start and select it, or run compmgmt.msc).
  2. Go to System Tools > Shared Folders > Open Files.
  3. Find the workbook. The Accessed By column usually shows which account has it open.
  4. Right-click the file and select Close Open File.

You need administrator rights on the server to do this. Microsoft’s step-by-step page for closing an open file in Shared Folders is written for Windows Server 2003; the tool has kept the same layout in later versions of Windows Server and Windows, though menus around it may differ. Once the server has released the file, delete a leftover owner file as in Fix 4. If locks keep returning on the same share, the archived Excel team post points to network storage settings, antivirus scanning and pending Windows and Office updates as places to look, which is a job for whoever runs the server.

Official sources

How we write our guides: read our editorial policy.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *