How to break external links in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To break external links in Excel, remove or replace every formula, name, object, query, or chart reference that points to another workbook, then save the workbook. Use the built-in Edit Links command on Windows when available, replace formulas with values, remove external named ranges, check objects and charts for hidden references, and run a short VBA routine when manual methods do not remove all links.
Why break external links?
-
External links create unwanted dependencies on other workbooks.
-
External links can slow workbook opening and updating.
-
External links may cause incorrect or stale data when source workbooks move or change.
How to locate external links
-
Use the Edit Links dialog (where available): Data > Edit Links. The dialog lists linked workbooks.
-
Search for the left square bracket character
[in formulas: press Ctrl+F, search for[and set Look in: Formulas. -
Check named ranges: Formulas > Name Manager for references containing
[or full file paths. -
Inspect objects and charts: right-click charts or shapes, check series formulas, text boxes, and chart titles for
'[. -
Review data connections and queries: Data > Queries & Connections and Data > Get Data > Queries.
-
Check conditional formatting, data validation, and pivot table sources for external file paths.
Method 1 — Use Edit Links (Windows Excel)
-
Select the Data tab.
-
Click Edit Links (group: Queries & Connections or Connections).
-
In the Edit Links dialog, select the source you want to remove.
-
Click Break Link. Confirm when prompted.
-
Save the workbook.
Notes:
-
Breaking links replaces formulas that reference the external workbook with their current values.
-
Some link types (OLE objects, complex query sources, or add-ins) may not break from here and require manual removal.
Method 2 — Edit Links behavior on Mac
-
On Excel for Mac (Microsoft 365), the Edit Links command may not be visible in some versions.
-
Use: Data > Connections or look under the Data tab for an Edit Links icon.
-
When Edit Links is unavailable, use the manual steps below or run the VBA routine to remove links.
-
Save the workbook.
Method 3 — Replace formulas with values (safe, irreversible)
-
Select the cells or entire worksheet containing external formulas.
-
Press Ctrl+C (Cmd+C on Mac).
-
Use Paste Special > Values (Home > Paste > Paste Values) or press Alt+E, S, V on Windows.
-
Save the workbook.
Condition: Use this method when the current values are final because formulas cannot be recovered after saving without a version history.
Method 4 — Replace external file name via Find & Replace
-
Press Ctrl+F and search for
[with Look in: Formulas. -
Review results and note the external references.
-
Press Ctrl+H to open Replace. Put the full external reference string (for example
'C:\Folder\[Source.xlsx]Sheet1'!) into Find. Leave Replace blank to remove the external path and then fix the local formula as needed, or replace the whole formula by value (see Method 3). -
Run Replace All only after reviewing a few occurrences.
Method 5 — Remove external named ranges
-
Go to Formulas > Name Manager.
-
Sort or scan names; look for Refers To containing
[or a full path. -
Select the problematic name and click Delete.
-
Confirm deletion and save.
Method 6 — Check objects, charts, and shapes
-
Inspect chart series (right-click chart > Select Data) for series formulas that include external workbook names. Edit or remove series.
-
Right-click text boxes, shapes and objects; check linked text or hyperlinks. Remove links as needed.
-
For embedded OLE objects, right-click, select Format Object or Edit, then remove the link or convert to static content.
Method 7 — Inspect conditional formatting, data validation, and pivot tables
-
Conditional formatting: Home > Conditional Formatting > Manage Rules. Edit rules to remove external references.
-
Data validation: Data > Data Validation. Check the Source for external references and correct.
-
Pivot tables: right-click pivot > PivotTable Options > Data. Confirm the Source or Change Data Source to a local range. Refresh the pivot after changes.
Method 8 — Break links using VBA (works on Windows and Mac where macros are supported)
-
Press Alt+F11 (Option+F11 on Mac) to open the VBA editor.
-
Insert a Module and paste the macro below.
-
Run the macro (F5). The macro attempts to break links and clear names referring to external workbooks.
Sub BreakAllExternalLinks()
Dim L As Variant
Dim i As Long
On Error Resume Next
' Break links reported by Edit Links
L = ThisWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
If Not IsEmpty(L) Then
For i = LBound(L) To UBound(L)
ThisWorkbook.BreakLink Name:=L(i), Type:=xlLinkTypeExcelLinks
Next i
End If
' Remove external names
Dim nm As Name
For Each nm In ThisWorkbook.Names
If InStr(1, nm.RefersTo, "[") > 0 Then
nm.Delete
End If
Next nm
' Replace formulas that contain '[' by their values
Dim sh As Worksheet, cel As Range
For Each sh In ThisWorkbook.Worksheets
On Error Resume Next
For Each cel In sh.UsedRange.SpecialCells(xlCellTypeFormulas)
If InStr(1, cel.Formula, "[") > 0 Then
cel.Value = cel.Value
End If
Next cel
On Error GoTo 0
Next sh
MsgBox "Attempted to remove links, names, and external formulas. Check Edit Links and named ranges.", vbInformation
End Sub
Condition: Back up the workbook before running macros. Running the macro may replace formulas with values; recovery requires a backup.
Verification checklist
-
Open Data > Edit Links; no links should appear.
-
Use Ctrl+F search for
[in formulas; no results should return. -
Open Name Manager; no Refers To should include
[or file paths. -
Refresh pivots and queries to confirm no external sources listed.
-
Save and reopen the workbook to ensure no prompts about missing source workbooks.
Troubleshooting common stubborn links
-
Hidden sheets may contain formulas; unhide all sheets and search.
-
Defined names inside charts and VBA code can reference external files; inspect code modules for
Workbooks("...")text. -
Linked pictures and OLE objects can retain external links; convert them to static images or delete them.
-
External links inside query/Power Query: open Data > Get Data > Queries and remove or edit the query source.
Best practices to prevent future external links
-
Use Power Query with clear local data sources or store source files in a known shared location.
-
Create copy workflows where formulas do not reference external workbook paths.
-
Use relative links only when you control workbook folder structure.
-
Keep a backup before breaking links.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to sort by highlighted cells in excel
Answers · 1
How to sort excel by column and keep rows together
Answers · 1
How to sort by time in excel
Answers · 1
How to sort alphabetically in excel by last name
Answers · 1