#REF! in Linked Workbooks: Broken File Paths/Shared Drive moves

An #REF! error in a linked workbook means that Excel can no longer locate an external file, worksheet, or cell range referenced by a formula. When folders are reorganized, shared drives are re-lettered, or files are migrated to cloud systems like OneDrive or SharePoint, static file paths break. If an external link recalculates while its source path is severed, Excel cannot confirm the target cell coordinates and replaces the missing references with #REF!.

Quick Answer

Go to the Data tab, click Edit Links, select the broken external source file, and click Change Source. Browse to the file’s new location on your hard drive, network share, or cloud folder. Excel will automatically update all formulas pointing to the old path.


Anatomy of an External Reference Break

A healthy external workbook reference includes the drive path, the workbook name, the sheet tab, and the cell coordinate:

='C:\Corporate\Finance\[AnnualBudget.xlsx]Summary'!$B$10

When links fail, the symptoms indicate where the break occurred:

  • File Missing / Path Broken: The formula keeps its structure until forced to recalculate, or Excel prompts you with a File Not Found dialog box upon opening.
  • Worksheet Tab Renamed or Deleted: If AnnualBudget.xlsx opens successfully, but the tab Summary was renamed to Budget_Summary, the formula immediately converts to:
    ='C:\Corporate\Finance\[AnnualBudget.xlsx]#REF!'!$B$10
  • Cell Range Deleted: If the target cell was cut or deleted in the source file, the formula converts to:
    ='C:\Corporate\Finance\[AnnualBudget.xlsx]Summary'!#REF!

In both cases, once Excel replaces a tab or range reference with #REF!, restoring the original file path will not automatically fix the formula; the text #REF! is now hardcoded into the formula string.


1. Mapped Network Drive Letters (e.g., Z:\ vs. X:\)

In corporate networks, local IT maps shared drives to arbitrary drive letters. If User A links a file to Z:\Accounting\Ledger.xlsx, but User B has that same folder mapped as X:\Accounting\Ledger.xlsx, User B will experience broken links and #REF! errors upon updating.

  • The Fix: Use UNC (Universal Naming Convention) paths instead of mapped letters:='\\Server01\Share\Accounting\[Ledger.xlsx]Sheet1'!$A$1
    UNC paths remain consistent across every computer connected to the corporate network.

2. OneDrive and SharePoint Sync Migrations

Moving files from on-premises file servers into OneDrive or SharePoint frequently breaks traditional links.

Excel attempts to translate local file paths (C:\Users\username\OneDrive...) into web URLs (https://company.sharepoint.com/...). If colleagues have not yet synchronized the target folder locally or lack access permissions, the web link fails to resolve, yielding #REF! or connection warnings.


To repair links across an entire workbook without manual formula editing:

  1. Open your destination workbook.
  2. Navigate to the Data tab on the Ribbon.
  3. In the Queries & Connections group, click Edit Links.
  4. Review the list of external sources:
    • Status: Error: Source not found indicates the file was moved, renamed, or deleted.
    • Status: Unknown click Check Status to force Excel to test the connection.
  5. Highlight the broken source file and click Change Source…
  6. Browse to the current location of the workbook, select it, and click OK.
Edit Links Manager:
-------------------------------------------------------------------------
Source File           | Type   | Update | Status
-------------------------------------------------------------------------
Regional_2025.xlsx    | Sheet  | A      | Error: Source not found  <-- (Click Change Source)
Corporate_Master.xlsx | Sheet  | A      | OK

Excel updates every formula referring to that source file across the entire workbook.


Fixing #REF! Caused by Renamed External Sheets

If the external file path is intact but someone renamed a worksheet tab inside the source file, Change Source will not resolve the issue because the formula still searches for the old tab name.

To repair these formulas in bulk:

  1. Press Ctrl + H to open the Find and Replace dialog.
  2. In the Find what field, enter the broken sheet reference:[AnnualBudget.xlsx]#REF!
  3. In the Replace with field, enter the corrected sheet name:[AnnualBudget.xlsx]Budget_Summary
  4. Set the Within dropdown to Workbook.
  5. Click Replace All.

  • Avoid INDIRECT Across External Files: The INDIRECT function cannot read closed workbooks; it will immediately return #REF! unless the source file is open on your desktop. See #REF! in INDIRECT: Referring to a Closed Workbook.
  • Manage Startup Prompts: Configure how Excel prompts users to update external data on file open using the troubleshooting steps in Handling “External Link” update errors on Startup.
  • Differentiate Missing Data from Missing Files: If the link is intact but specific lookup codes are missing from the external table, your formula will return #N/A rather than #REF!. Consult #N/A across External Workbook Links.
  • Modern Alternative (Power Query): Replace complex, multi-workbook formula webs with Power Query. Power Query imports and shapes data from external workbooks cleanly, storing the result in local tables that never suffer from broken cell-coordinate #REF! errors.

For an exhaustive diagnostic strategy covering all structural formula breaks in Excel, review How to Fix #REF! Errors in Excel: A Comprehensive Structural Repair Guide.