Excel file locked for editing by another user (or by you): fixes

Excel says the file is locked for editing by another user, or by you? Find who has it open, clear a stuck lock (~$ file, preview pane, Task Manager) and co-author.

Applies to: Excel for Microsoft 365, Excel 2024, 2021, 2019 and 2016 on Windows 11 and Windows 10; files on a PC, a network share, OneDrive or SharePoint · Published October 30, 2026 · Updated November 29, 2026

Also available in: العربية

Short answer: “locked for editing” means Excel thinks someone already has the workbook open for editing. If a colleague really has it open, open it Read-Only or click Notify, or move the file to OneDrive or SharePoint so you can both edit at once. If the lock names you or “another user” but nobody has it open, close every copy of Excel in Task Manager, delete the hidden file that starts with ~$ next to the workbook, and turn off the File Explorer preview pane.

The message usually looks like this: File in Use. Budget.xlsx is locked for editing by ‘another user’. Excel then offers to open a Read-Only copy or to Notify you when the file is free. Notify only tells you when the lock is released; it doesn’t fix the cause.

Updated October 2026. Microsoft’s “Fixes or workarounds for recent issues in Excel for Windows” page (last updated October 2026) lists no current issue with locked files, co-authoring or AutoSave, so the steps below cover the real causes. Note that Excel 2016, 2019 and 2021 LTSC don’t support co-authoring: on those versions, only one person can edit a shared workbook at a time. Source: Microsoft Support, “Excel file is locked for editing” (updated 2026).

Why does Excel say a file is locked for editing?

When you open a workbook for editing, Excel creates a small hidden owner file in the same folder, named like ~$Budget.xlsx, which holds the name of the person editing it. Anyone else who opens the workbook sees the lock. When Excel closes normally, it deletes the owner file. If Excel crashes, the PC loses power, or the network drops, the owner file can be left behind and the workbook stays “locked” with nobody in it.

What the message says → where to start

What you see Most likely cause Start with
“Locked for editing by [a colleague’s name]” They really have it open Step 1
“Locked for editing by you” (your own name) Excel still open on another PC, or a crashed session Steps 2, 3 and 4
“Locked for editing by ‘another user’” Leftover owner file, preview pane or a background process Steps 3, 4 and 5
File is on a network drive (a mapped drive or \\server\share path) Server still holds the file open Steps 4 and 8
File is on SharePoint or Teams and someone “checked it out” Check-out Step 7
On OneDrive or SharePoint but you still can’t edit together Co-authoring blocked by a setting or format Step 6

1. If a colleague has it open: Read-Only, Notify or co-author

  • Choose Read-Only to look at the file now. You can’t save changes to the original, but File > Save As lets you save a copy. If you only need to send someone the figures, a PDF can’t be edited by mistake: Excel can save one the same way Word does, or use Microsoft Print to PDF (see how to save a file as a PDF and make it smaller).
  • Need only a few figures from it? Open it Read-Only, copy the table into your own workbook and match the rows by ID or name with a lookup formula; our guide on using XLOOKUP and VLOOKUP in Excel shows how.
  • Choose Notify to get a message when they close it.
  • Ask them to save and close the file.
  • For a permanent fix, store the file on OneDrive or SharePoint (including a Teams channel’s Files tab) and open it with Microsoft 365. Then several people can edit at the same time (step 6).

On a file in OneDrive or SharePoint, if you only have view access, select Viewing at the top right and then Request more access.

2. Close the file everywhere you might have it open

If the lock names you, Excel thinks you have the file open somewhere else: another PC, a laptop at home, or a remote desktop session. Close the workbook on every device, then wait a few minutes. For files on OneDrive or SharePoint, Microsoft says the server releases the lock on its own after you close it.

3. End leftover Excel processes in Task Manager

A crashed or hidden copy of Excel can still hold the file.

  1. Save and close the Excel windows you can see.
  2. Press Ctrl + Shift + Esc to open Task Manager.
  3. On the Processes tab, select any remaining Microsoft Excel entry, then End task.
  4. Open the file again.

Restarting the PC does the same thing and also releases locks held by other programs.

4. Delete the leftover ~$ owner file

  1. Close Excel completely (step 3).
  2. Open the folder that holds the workbook in File Explorer.
  3. Show hidden files: on Windows 11 select View > Show > Hidden items; on Windows 10 open the View tab and tick Hidden items.
  4. Look for a file with the same name as your workbook that starts with ~$ (for example ~$Budget.xlsx).
  5. Delete it, then open the workbook again.

On a network drive, Microsoft also says to clear Hide protected operating system files (Recommended) in Folder Options so the owner file shows. Only delete the ~$ file if you’re sure nobody is editing the workbook: deleting it while a colleague works in the file doesn’t close their session.

5. Turn off the File Explorer preview pane

If the workbook is selected in File Explorer with the preview pane open, Windows reads the file to draw the preview, which can keep it in use. Press Alt + P in File Explorer to toggle the preview pane off, click a different file, and try again.

Antivirus scans, backup software and search indexing can also hold a file briefly. Microsoft lists these among the causes of “file in use” errors: wait a minute, or restart the PC.

6. Make co-authoring work (OneDrive and SharePoint)

Co-authoring lets several people edit one workbook at the same time, so locks stop being a problem. Microsoft’s requirements:

Requirement What Microsoft says
Excel version Excel for Microsoft 365 (latest version) or Excel for the web. Not Excel 2016, 2019 or 2021 LTSC
Account A Microsoft 365 subscription
Where the file is saved OneDrive, OneDrive for Business or a SharePoint Online library (including Teams). Not a network share, a local folder, SharePoint on-premises, Dropbox, Box or Google Drive
File format .xlsx, .xlsm or .xlsb. Not the “Strict Open XML Spreadsheet” format; old .xls files need converting
AutoSave On (the switch at the top left); co-authoring works best with it on

Things that block co-authoring even when the above is right:

  • The old “Shared Workbook” feature. Microsoft says turning this legacy feature off is the first thing to try.
  • Password or restricted access. Go to File > Info > Protect Workbook and remove passwords or restricted access. Files protected with Information Rights Management (IRM) or Rights Management Service can’t be co-authored.
  • “Refresh data when opening the file” on a data connection: turn it off in the connection’s properties.
  • File marked as final, or a SharePoint library with required check-out turned on.
  • Paused OneDrive sync. If you open the file from a synced OneDrive folder, make sure the sync app isn’t paused. See OneDrive not syncing.

7. SharePoint or Teams: check the file back in

A file that someone has checked out is different from a normal lock: only that person can edit it until it’s checked back in. In the SharePoint document library, a checked-out file shows a small red circle with a check mark on its icon.

  • If it’s checked out to you: select the file, open the … (More) menu above the list, and choose Check in (or Discard check out to drop your changes).
  • If it’s checked out to someone else, ask them to check it in. People with the right permissions (usually site owners) can check in a file checked out by someone else.

Microsoft advises turning off Require check out on libraries where people co-author, because it’s incompatible with co-authoring.

8. For IT: close the open file on a Windows file server

If the workbook lives on a Windows file share and a user’s session still holds it after they’ve closed Excel, an administrator can close it on the server:

  • PowerShell: Get-SmbOpenFile | Where-Object -Property ShareRelativePath -Match "Budget.xlsx" | Close-SmbOpenFile -Force
  • Command line: openfiles /query /fo table to list open files, then openfiles /disconnect /id <ID>.

Microsoft warns that forcibly closing a file can cause data loss for the user who had it open, so contact them first. To make files easier to share, move team workbooks to SharePoint or Teams instead.

Still locked?

  • Make a working copy with File > Save As, then merge changes later.
  • Clear the Office Document Cache: Microsoft’s “Delete your Office Document Cache” page gives the steps for your version and says deleting the cache isn’t dangerous.
  • Check the file name and folder path: Microsoft lists an open issue where Excel doesn’t fully support some special characters in file names or paths.

Frequently asked questions

How do I unlock an Excel file that is locked for editing?

If nobody really has it open: (1) close the workbook on every PC, phone and browser tab you use; (2) end every Microsoft Excel process in Task Manager; (3) delete the hidden ~$ file with the same name in the workbook’s folder; (4) turn off the File Explorer preview pane; then open the file again. If a colleague does have it open, open it Read-Only or put it on OneDrive or SharePoint so you can both edit at once (steps 1–6 above).

How do I find out who is using an Excel file?

The lock message shows the name saved in the owner file (~$ file), so it usually names the person. If it says “another user”, nobody may have it open: the lock is often left over from a crash. On a Windows file server, IT can see open files with Get-SmbOpenFile or openfiles.

Why does Excel say the file is locked for editing by me?

Excel thinks you have the workbook open elsewhere: on another device, in a hidden Excel process, or from a session that crashed. Close it everywhere, end Excel in Task Manager, delete the leftover ~$ file, and wait a few minutes for OneDrive or SharePoint to release the lock.

Is it safe to delete the ~$ file?

Yes, if Excel is closed and nobody is editing the workbook. The ~$ file only holds the editor’s name, not your data. Don’t delete it while a colleague is working in the file.

Can two people edit the same Excel file at the same time?

Yes, with co-authoring: the file must be on OneDrive or SharePoint (including Teams), in .xlsx, .xlsm or .xlsb format, and opened in Excel for Microsoft 365 or Excel for the web. Files on a normal network drive can only be edited by one person at a time.

Related guides: OneDrive not syncing · Outlook not opening or not responding · Teams microphone or camera not working

Sources checked October 2026: Microsoft Support, “Excel file is locked for editing” (updated August 2026); “Solve the ‘File in Use’ error” (updated June 2026); “File is locked by another user and commands are grayed out” (updated September 2026); “Why can’t I edit this file?”; “Collaborate on Excel workbooks at the same time with co-authoring” (updated 13 October 2026); “Best practices for coauthoring in Excel”; “Check out, check in, or discard changes to files in a library” and “Top questions about check out, check in and versions” (updated October 2026); “Delete your Office Document Cache”; “Fixes or workarounds for recent issues in Excel for Windows” (updated October 2026); Microsoft Learn, “openfiles” and “Close-SmbOpenFile”; Microsoft Excel Support Team blog, “The definitive locked file post” (archived).

Related guides

All calculators

Currency converter & remittance calculator

Daily rates, what your family receives, and a monthly budget.

Percentage calculator

X% of a number, percent of a total, and percentage change.

Discount calculator

Sale price, savings and the real percentage off.

Loan EMI calculator

Monthly instalment, total interest and total repayment for a loan.

Compound interest calculator with monthly contributions

How savings grow with monthly deposits and compound interest.

Salary converter: hourly to monthly and yearly pay

Hourly, daily, weekly, monthly and yearly pay in one step.

Fuel cost calculator: petrol cost for a trip or commute

Petrol cost of a trip or monthly commute, split per person.

VAT calculator: UAE & KSA

Add or remove VAT, with Gulf and other country rates built in.

UAE gratuity calculator

Estimate your end-of-service gratuity under the UAE Labour Law.

UAE leave salary calculator: unused annual leave pay

Your annual leave balance and unused leave pay under UAE Labour Law.

Overtime calculator UAE & Saudi Arabia: pay by labour law

Overtime pay under UAE and Saudi labour law: night, rest day and holiday rates.

Saudi end of service calculator (Articles 84 & 85)

Estimate your end-of-service award under the Saudi Labor Law.

Salary tax calculator Pakistan 2026-27 (tax year 2027)

Income tax on your salary under the 2026-27 slabs, per month and per year.

Age calculator: Gregorian and Hijri (Islamic) age

Exact age in years, months and days, Gregorian and Hijri.

Days between dates calculator (with working days)

Days, weeks, months and working days between two dates.

Gold price calculator UAE: making charges & VAT

Price of gold jewellery or bars from today’s rate, with making charges and VAT.

Zakat calculator: how much zakat do I owe on money and gold?

Zakat on cash, gold, silver and savings, with gold or silver nisab.