Excel Links Break After Moving a Workbook to OneDrive
🔍 WiseChecker

Excel Links Break After Moving a Workbook to OneDrive

You move an Excel workbook to OneDrive and open it from the cloud location only to find that all external cell references show #REF! errors or prompt you to update links that no longer work. This happens because Excel stores link paths as absolute file paths on your local drive, and moving the file to a OneDrive folder changes the path structure. The links point to the old location, which no longer exists after the move. This article explains why Excel links break when you move a workbook to OneDrive and provides step-by-step methods to repair those broken links so your formulas work again.

Key Takeaways: Fixing Broken Excel Links After Moving to OneDrive

  • Data tab > Edit Links: Opens the link management dialog where you can change source paths, break links, or check link status
  • INDIRECT function with cell references: Creates dynamic links that update automatically when the workbook location changes
  • OneDrive sync path (C:\Users\[User]\OneDrive): The new root folder path that replaces the old local path after moving a workbook

ADVERTISEMENT

Why Excel Links Break When You Move a Workbook to OneDrive

Excel external references, also called links, store the full absolute path to the source workbook. For example, a link might look like 'C:\Users\John\Documents\[Source.xlsx]Sheet1'!$A$1. When you move the workbook to a OneDrive folder, the path changes to 'C:\Users\John\OneDrive\[Source.xlsx]Sheet1'!$A$1 or to a SharePoint URL such as 'https://contoso.sharepoint.com/sites/team/Documents/[Source.xlsx]Sheet1'!$A$1. Excel does not update these paths automatically. The old path no longer exists, so the link returns a #REF! error or triggers a prompt to find the source file.

This problem occurs in three common scenarios:

  • You move the workbook from a local folder to a OneDrive synced folder on the same computer
  • You upload the workbook to OneDrive or SharePoint and open it from the web app or a different computer
  • You share the workbook with a coworker who saves it to their own OneDrive folder

In each case, the link path changes, and Excel cannot resolve the reference unless you manually update the source path.

Steps to Repair Broken Excel Links After Moving to OneDrive

The following methods fix broken links by updating the source path, replacing the link with a value, or converting the link to a dynamic reference that adapts to the workbook location.

Method 1: Use Edit Links to Change the Source Path

  1. Open the workbook that contains broken links
    If prompted to update links, click Don’t Update to avoid additional errors.
  2. Go to Data tab > Queries & Connections group > Edit Links
    The Edit Links dialog opens and lists all external sources referenced in the workbook.
  3. Select the broken link and click Change Source
    A file browser dialog opens. Navigate to the new location of the source workbook, which is now inside your OneDrive folder. Select the source file and click OK.
  4. Click Close in the Edit Links dialog
    Excel updates all formulas that reference the selected source. The #REF! errors should disappear.
  5. Save the workbook to OneDrive
    Press Ctrl+S to save the changes. The links now point to the OneDrive path.

If the source workbook is also in OneDrive but on a different user’s account, you may need to use the SharePoint URL. In the Change Source dialog, paste the full SharePoint link to the source file instead of browsing to a local path.

Method 2: Replace Links with Static Values

If you no longer need the connection to the source workbook, you can break the link and keep the current values. This prevents future link errors.

  1. Open the workbook and go to Data tab > Edit Links
    The Edit Links dialog shows all external sources.
  2. Select the broken link and click Break Link
    A warning appears: Breaking links permanently converts formulas to their current values. This cannot be undone. Click Break Links to confirm.
  3. Click Close and save the workbook
    All formulas that referenced the external source are replaced with the values that were last calculated. No further link prompts will appear.

Method 3: Use the INDIRECT Function for Dynamic Links

For workbooks that you move frequently or share with others, replace static external references with the INDIRECT function. INDIRECT builds a reference from text, allowing you to construct the path using a cell that contains the folder location.

  1. In the destination workbook, create a cell that stores the source workbook path
    For example, in cell A1 of Sheet1, enter the full path to the source workbook: C:\Users\John\OneDrive\Source.xlsx. You can also use a SharePoint URL.
  2. Write the INDIRECT formula
    In the cell where you want the linked value, enter: =INDIRECT("'"&A1&"[Source.xlsx]Sheet1'!$A$1"). This formula combines the path from cell A1 with the sheet and cell reference.
  3. Test the formula
    If the source workbook is open, INDIRECT returns the current value. If the source is closed, you may need to use a full UNC path or open the source workbook first.
  4. Update the path cell when you move the workbook
    Change the value in cell A1 to the new location, and all INDIRECT formulas update automatically.

Note: INDIRECT requires the source workbook to be open in the same Excel instance to return a live value. For closed workbooks, use a different approach such as Power Query or a VBA macro.

ADVERTISEMENT

If Excel Links Still Show Errors After the Main Fix

Excel prompts to update links every time I open the workbook

This happens when the source workbook is in a different OneDrive sync folder or on a different computer. Open the Edit Links dialog and check the status column. If the status says Unknown or Error: Source not found, use Change Source to point to the correct file. If the source is on a different user’s OneDrive, use the SharePoint URL instead of a local path.

Links work on my computer but break when a coworker opens the file

The coworker’s OneDrive folder has a different local path, such as C:\Users\Jane\OneDrive. Excel does not translate paths between users. Use the INDIRECT method described above, or store the source workbook in a shared SharePoint document library and use the SharePoint URL in the link.

OneDrive sync creates a duplicate file that breaks the link

When two users sync the same SharePoint library, OneDrive may create a copy of the file with a name like Source-JohnSmith.xlsx. This changes the file name and breaks the link. To prevent this, ensure all users sync the same library and use the original file name. In the Edit Links dialog, change the source to point to the correct file name.

Absolute Path vs Relative Path vs INDIRECT: Key Differences

Item Absolute Path Relative Path INDIRECT Function
Description Full local or network path stored in the formula Path relative to the current workbook location Dynamic reference built from a text string
Example ='C:\Users\John\[Source.xlsx]Sheet1'!$A$1 Not natively supported for external links in Excel =INDIRECT("'"&A1&"[Source.xlsx]Sheet1'!$A$1")
Breaks when moved to OneDrive Yes N/A No, if the path cell is updated
Works across users No N/A Yes, if the path cell uses a SharePoint URL
Requires source to be open No N/A Yes

Excel does not support relative paths for external workbook links. The INDIRECT function is the only built-in way to create a path that you can update without rewriting every formula.

You now know why Excel links break after moving a workbook to OneDrive and have three methods to fix them. Start by using Edit Links to change the source path to the OneDrive location. If you move workbooks often, switch to the INDIRECT method with a path stored in a cell. For a long-term solution, consider moving both workbooks to a SharePoint document library and using SharePoint URLs in your links.

ADVERTISEMENT