If Excel says a workbook is locked for editing by you, first check whether it is still open in another Excel window, on another device, or in a background session. Close every active copy and wait for syncing to finish; if the message remains, use the steps below to identify whether the lock is stale, belongs to a collaborator, or is actually a different kind of access restriction.
What “locked for editing by me” means
Excel displays this warning when it believes another session has control of the file, and the name shown is associated with that session. If the name is yours, Excel may have found a session using your account or computer identity. It does not necessarily mean that the workbook has been permanently damaged or that someone has deliberately blocked you.
The exact behavior depends on where the workbook is stored. A file on a local drive or traditional network share can use a file-locking mechanism to prevent conflicting edits. A workbook stored in OneDrive or SharePoint may use Microsoft 365 co-authoring, where people can edit together when the file, account, and Excel version support it. A lock can also remain briefly after Excel closes, or persist if an app or computer stops responding before releasing it.
When access is blocked, Excel may offer a read-only option or let you know when the file becomes available. Read-only access lets you inspect the workbook, but changes generally need to be saved to a separate copy unless the lock clears and you reopen the original.
Why Excel can show your name
Several ordinary situations can make the message appear to point back to you:
- The workbook is open twice. You may have opened it from File Explorer, a recent-files list, an email attachment, or a second Excel window. The copies may be working from the same path, or one may be a downloaded copy with a similar name.
- Excel did not close cleanly. A crash, forced shutdown, or interrupted remote session can leave a lock in place until the application or file-sharing service releases it.
- You opened it on another device. A workbook may still be open on a laptop, office computer, or remote desktop signed in with your account.
- The file is syncing or being handled by another service. OneDrive, SharePoint, a network drive, backup software, or document-management software can delay updates to file status.
- Your displayed identity is being used for a different session. Excel may show a Windows or Microsoft 365 identity associated with the session; the name alone is not proof that the lock is stale.
First confirm the full file location and filename. Two files called Budget.xlsx in different folders are not the same workbook, while a cloud shortcut and a locally synced copy can make the location less obvious.
Safest steps to clear a lock on Windows
Try these steps in order. The early checks preserve unsaved work and avoid disturbing another person’s active edit.
- Look for another open copy. Use Alt+Tab to review open windows, then check Excel’s open workbooks. Save any changes you need and close the workbook normally. If you have more than one Excel window, inspect each before closing it.
- Check other devices and sessions. Close the workbook on other computers or remote desktops where you are signed in. If another person could be editing it, ask them to save and close it before proceeding.
- Wait for cloud syncing. If the file is in OneDrive or SharePoint, check that the sync client is running and that the file has finished syncing. Do not repeatedly open and save competing copies while a sync is pending.
- Exit Excel normally. Close all workbooks and choose File > Exit, or close the Excel windows. Reopen Excel only after it has finished closing, then try the file again.
- Check for a hung Excel process. If Excel appears closed but the lock remains, press Ctrl+Shift+Esc to open Task Manager. Look for Microsoft Excel in the Processes list. End the task only after you have checked for unsaved work; force-closing can discard it. Then reopen the workbook.
- Restart the computer if necessary. A restart can clear a local session that will not release. On a shared computer, make sure nobody else is using the session before restarting.
For a Mac, close the workbook and quit Excel with Command+Q. If Excel is unresponsive, use Activity Monitor to quit it only after considering unsaved work. The Windows Task Manager instructions do not apply to macOS.
OneDrive, SharePoint, and co-authoring
For a cloud-hosted workbook, verify that you are opening the intended OneDrive or SharePoint file, not an attachment or a second copy saved locally. Check the OneDrive sync status and resolve any sign-in or sync errors before trying again. If the workbook is open in Excel for the web or on another device, close that session too, then allow time for the service to update its status.
Co-authoring is not available in every setup. It depends on factors such as where the file is stored, whether the workbook format and account support co-authoring, and whether participants are using compatible versions of Excel. If Excel offers to open the file read-only, that can be a reasonable temporary choice when you only need to review it. Avoid editing separate copies and later overwriting the shared original: that can leave one person’s changes missing.
Some organizations use SharePoint check-out or document-management rules that reserve a file for one person. If a colleague has checked out the workbook, or if a check-out was not released properly, an administrator or the person responsible for the library may need to resolve it. Do not try to bypass organizational controls by changing or deleting files in the storage location.
Stale lock files and network folders
With some older or traditional shared-folder workflows, Excel creates a small owner or lock file beside the workbook. Its name commonly begins with a tilde and dollar sign, such as ~$Plan.xlsx. It is usually hidden in File Explorer. Such a file can help indicate that a workbook is in use, but it is not safe to assume every visible lock file is abandoned.
Do not delete a lock file while anyone might have the workbook open. Removing an active lock can allow conflicting edits or interfere with saving. First have all users close the workbook, confirm Excel is no longer running on the relevant computers, and wait for the file server to update. If the lock still remains on a network share, ask the network or IT administrator to check the file’s open sessions. Permissions and server behavior differ, so deleting files directly is not a universal fix.
For a local file that you own, after all Excel sessions are closed and you have confirmed the workbook is not being used, a leftover temporary lock may be removable. If you are unsure, make a backup and contact support rather than deleting hidden files. Cloud-hosted workbooks may use service-side collaboration state instead of a simple local lock file, so this remedy may not apply.
Tell a lock apart from read-only or protection
“Locked for editing” can be confused with other Excel restrictions. The right fix depends on the message and what you can do after opening the file:
- Read-only status: Excel opens the file but does not let you save changes to the original. The file may have been marked read-only, opened from a location where you lack write permission, or opened while another session has it reserved.
- Protected worksheet: You can open the workbook, but some cells or actions are restricted. A sheet password or allowed-editing settings may be involved. A worksheet lock is not the same as another person having the file open.
- Protected workbook structure: Excel may prevent adding, moving, or deleting sheets while still allowing edits to unlocked cells. This is a workbook-protection setting, not an editing-session lock.
- Password required to open: This is file encryption or password protection. It cannot be fixed by closing an extra Excel window; you need the correct password or help from the file owner.
- Folder or file permissions: If you lack write access to the location, Excel may allow viewing but not saving over the original. Ask the owner or administrator for the appropriate access rather than changing a shared file’s permissions without approval.
For example, if you can edit cells but cannot rename a sheet, investigate workbook structure protection. If Excel will not let you open the file for editing and names a current user, investigate active sessions and the file’s storage location first.
When to save a separate copy
If you need to work immediately and the original remains unavailable, use Excel’s option to save a copy under a different name or in a location you control, provided your organization permits it. Keep the original unchanged and make the copy’s name clear, such as “Forecast-review-copy.” This protects your work, but it does not merge it into the shared workbook automatically.
Before transferring changes back, compare the two versions and coordinate with the owner or other editors. A workbook may contain formulas, links, macros, data connections, or formatting that are easy to overwrite accidentally. If the file is sensitive or governed by company policy, use an approved location rather than emailing it or saving it to a personal account.
Prevent the warning from returning
A few habits reduce duplicate sessions and confusion:
- Open the workbook from its regular OneDrive, SharePoint, or network location instead of repeatedly editing downloaded attachments.
- Close the workbook on one device before starting an editing session on another, especially when you know the file is not co-authoring.
- Wait for cloud sync to complete before shutting down or disconnecting from a network.
- Use descriptive filenames and folders so similarly named local and shared copies are easier to distinguish.
- Tell collaborators when you have finished with a file if the team uses check-out or single-editor workflows.
- Save regularly. If Excel becomes unresponsive, try to recover or save work before force-quitting whenever possible.
Frequently Asked Questions
Why does Excel say I have the workbook locked when it is not open?
Another Excel session, device, or user may still hold the lock, or a previous session may not have released it cleanly. Check other devices, close Excel fully, and verify the file’s cloud or network status before assuming the lock is stale.
Can I open a workbook that is locked for editing?
Often Excel lets you open it as read-only. You can review the contents, but changes may need to be saved as a separate copy until the original becomes available. Do not save a competing copy over the shared file without coordinating with its editors.
Is it safe to delete the ~$ lock file?
Not while anyone could have the workbook open. A lock file may represent an active editing session. Confirm that every user has closed the workbook and, for a network or managed location, ask the administrator to check active sessions before removing anything.
Will restarting Excel remove the lock?
It can clear a lock held by a local session that has stopped responding, but it will not resolve every cloud, network, permission, or check-out restriction. Close normally first, check for unsaved work, and restart only after confirming that no other user is editing.
Does worksheet protection cause this message?
Usually not. Worksheet protection restricts changes to parts of an opened workbook; an editing-lock warning concerns access to the file or an editing session. Read the exact message and check whether you can open the workbook before choosing a fix.
Related
- AI and Power Query: What It Can and Cannot Do in Excel
- Power Query Split Cell Into Rows: Steps and Examples
- Power Query Editor: How to Split Text into Multiple Columns
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- How to Fix a #REF! Error in Excel Without Losing DataTo remove a #REF! error in Excel, first make a copy of the workbook, then find the formula…
- Excel Formulas Not Calculating? Fix the Common CausesIf Excel formulas are not calculating, first choose Formulas > Calculation Options > Automatic, then press F9 to…
- Excel Find Not Working? Causes and Fixes ExplainedExcel’s Find command usually fails because it is searching the wrong sheet or selection, looking in formulas instead…
- Excel Page Breaks: How to Insert, Remove, and Fix ThemAn Excel page break determines where worksheet content moves onto the next printed page. In Microsoft Excel for…
- Google Sheets Filter Not Filtering? Fix the Common CausesIf a Google Sheets filter is not filtering, check that the filter covers the full data range, that…
- XLOOKUP Spill Error: Why It Happens and How to Fix ItAn XLOOKUP spill error usually means Excel cannot place all the results returned by the formula into the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.