How to find links in Excel and break external links (2024)

Keeping track of all external references in a workbook can be challenging. This tutorial will teach you a few useful techniques to find links to external sources in Excel formulas, objects and charts and shows how to break external links.

When you want to pull data from one file to another, the fastest way is to refer to the source workbook. Such external links, or external references, are a very common practice in Excel. After completing a particular task, however, you may want to find and probably break those links. Astonishingly, there is no quick way to locate all links in a workbook at once. Depending on exactly where the references are located - in formulas, defined names, objects, or charts - you will have you use different methods.

How to find cells with external links in Excel

External links in cells are the most common case. They are also the easiest to find and remove. For this, you can utilize the Excel Find feature:

  1. In your worksheet, press Ctrl + F to open the Find and Replace dialog.
  2. Click the Options button.
  3. In the Find what box, type .xl. This way, you will search for all possible Excel file formats including .xls (older workbooks) .xlsx (modern workbooks) .xlsm (macro-enabled workbooks), etc.
  4. In the Within box, select either Workbook to search in all tabs or Sheet to look in the current worksheet only.
  5. In the Look in box, choose Formulas.
  6. Click the Find All button.

That's it! You've got a list of cells that have any external references in them.
How to find links in Excel and break external links (1)

And these useful tips will help you manage the results:

  • To select a cell that contains an external link, click the cell address in the Cell
  • To group the found links the way you want, click the corresponding column header, for example, Sheet or Formula.
  • To select all cells with external references, place the cursor anywhere within the results and press Ctrl + A. This will select both the results in the Find and Replace dialog box and the cells in the workbook.

Note. With Find and Replace you can only identify external links in cells. If you've removed all external references from formulas but Excel still says there are links to external workbooks, then check other possible locations discussed below.

How to find links in Excel named ranges (defined names)

Excel pros often name ranges and individual cells to make their formulas easier to write, read, and understand. Data validation drop-down lists are also easier to create with named ranges, which in turn may refer to outside data. To take care of such cases, check for external links in Excel names:

  1. On the Formulas tab, in the Defined Names group, click Name Manager or press the Ctrl + F3 key combination.
  2. In the list of names, check the Refers Tocolumn for external links. References to other workbooks are enclosed in square brackets like [Source_data.xlsx].

How to find links in Excel and break external links (2)

How to identify external links in Excel objects

If you've linked objects such as shapes, text boxes, WordArt and the like to other Excel files, then you can use the Go To Special feature to locate such links:

  1. On the Hometab, in the Formats group, click Find & Select > Go to Special. Or press F5 to open for the Go To dialog, and then click Special… .
  2. In the Go To Special dialog box, select Objects and click OK. This will select all objects on the active sheet.
    How to find links in Excel and break external links (3)
  3. Press the Tab key to cycle through the selected objects and check each individual object for references to other workbooks.

If an object is linked to a specific cell, you can see an external reference in the formula bar:
How to find links in Excel and break external links (4)

If an object is linked to a file, then hover over the object with your mouse to see where it points to:
How to find links in Excel and break external links (5)

Note. If an object is linked to a whole file rather than an individual cell, such link cannot be broken by using the Edit Links feature. To remove the link, right-click the object and select Remove link from the context menu.

How to find links to other files in Excel charts

In case external links are used in a chart title or data series, you can locate them in this way:

  1. On the graph, click the chart title or data series you wish to check.
  2. In the formula bar, look for a reference to another Excel file.

External reference in chart title:
How to find links in Excel and break external links (6)

External link in chart data series:
How to find links in Excel and break external links (7)

If your chart contains several data series, you can quickly move between them in this way:

  1. Select the target chart.
  2. Go to the Format tab > Current Selection group, click the arrow next to the Chart Elements box, and select the data series of interest.

How to find links in Excel and break external links (8)

How to find external links in Pivot Tables

Most often a PivotTable is created using the data in the same workbook. But sometimes, the source data resides in an outside file. To find the exact location of your PivotTable's source data, perform these steps:

  1. Click any cell within the Pivot Table.
  2. On the PivotTable Analyze tab, in the Data group, click the Change Data Source button.
    How to find links in Excel and break external links (9)
  3. In the dialog box that appears, check the data source in the Table/Range box to see whether it is linked externally.
    How to find links in Excel and break external links (10)

How to enable links to external workbooks in Excel

When you open a workbook with links to other files for the first time, Excel shows a security warning informing you that the file contains links to external data. To allow the links to update, simply click the Enable Content button.
How to find links in Excel and break external links (11)

On subsequent openings of the same file, you will be presented with the following prompt asking if you want to update the links. If you trust the linked documents and want to pull the latest data, click Update.
How to find links in Excel and break external links (12)

Control the security prompt about updating links

By default, Excel asks whether or not to update external references every time you open a workbook. However, you can control whether the message appears and whether the links are updated or not.

  1. On the Datatab, in the Queries & Connections group, click Edit Links.
  2. In the lower-left corner of the Edit Links dialog box, click Startup Prompt….
    How to find links in Excel and break external links (13)
  3. In the Startup Prompt dialog box, choose the option that works best for you:
    • Let users choose to display the alert or not (default).
    • Don't display the alert and don't update automatic links - it makes sense to choose this option when you are sharing a workbook with other people who do not have access to the source files.
    • Don't display the alert and update links - you can choose this setting when you completely trust the sources.

How to find links in Excel and break external links (14)

Change security setting for external links

You can also set links to other files to be updated automatically in a particular workbook without getting a security warning by changing the Trust Center security settings:

  1. In the target workbook, click the File tab > Options.
  2. In the Excel Options dialog box, click Trust Center > Trust Center Settings.
    How to find links in Excel and break external links (15)
  3. In the Trust Center dialog box, click External Content, and then select Enable automatic update for all Workbook Links under Security settings for Workbook Links.

    With this option turned on, Excel will update all links to external sources in the current workbook automatically without showing you any warnings or prompts.

How to find links in Excel and break external links (16)

Please note that automatic updating of links to unknown files can be harmful and therefore is not recommended. Enable it only when you are 100% confident in the security of the outside data. Or, turn on this option temporarily, and then return to the default Prompt user on automatic update for Workbook Links setting.

Note. Regardless which option you choose, Excel will still display the below prompt if the workbook contains invalid or broken links.
How to find links in Excel and break external links (17)

How to break external links in Excel

In Excel, breaking a link to another workbook means replacing an external reference with its current value.

For example, if you break the following external reference, it will be replaced with the value that is currently in cell A1 on the Jan sheet in the Source data workbook:

='[Source data.xlsx]Jan'!$A$1

If you break an external link in the below formula, the formula will be changed to its calculated value, whatever it is:

=SUM('[Source data.xlsx]Jan'!A2:A7)

Note. Because breaking links is the action that cannot be undone, it may be wise to save a backup copy of your workbook first.

To break external links in Excel, this is what you need to do:

  1. On the Data tab, in the Queries &Connections group, click the Edit Links button.

    If this button is greyed out, that means there is no linked data in your workbook.

  2. How to find links in Excel and break external links (18)

  3. In the Edit Links dialog box, select the links that you want to break.
    • To select multiple links, click on each one individually while holding down the Ctrl key.
    • To select all links, press the Ctrl + A shortcut.
  4. Click the Break Link button.

How to find links in Excel and break external links (19)

Note. Under ideal circ*mstances, this feature should remove all external links in a workbook. Unfortunately, we do not live in a perfect world :( Some links to outside data, e.g. external source data in Pivot Tables, are not shown in the Edit Links dialog while others cannot be broken. If the Edit Links button is grayed out in your workbook but you are still getting a prompt about external data, then you will have to check each possible place where external references may be lurking (such as objects, charts, etc.) and change or remove the links manually.

Get a list of all external links in a workbook

To get a list of all external sources that your workbook refers to, you can use one of the following methods.

Traditional approach

The conventional way to check links in Excel is by using the Edit Links feature: Data tab > Queries & Connections group > Edit Links.

This will display the following information:

  • Source - the name of the linked file
  • Type - the link type: a workbook or worksheet
  • Update - whether the link updates automatically or manually
  • Status - the status of the link such as OK, Source is Open, Warning, Unknown, etc. To get the most recent info, click the Check Status button on the right.

How to find links in Excel and break external links (20)

Very quick and straightforward, this method is not very convenient though. To see the location of the source file, you need to click each link, one at a time.

Dynamic arrays and Excel 4.0 macros.

A very cute trick suggested by Bob Ulmas in his book "This isn't Excel, it's Magic!" can help you retrieve the locations of all source files in one go. The solution combines the recently introduced dynamic arrays with the good old Excel 4.0 macros.

To generate a list of all external references in a given workbook, this is what you need to do:

Step 1. Create a new name that references the macro

To be able to use a built-in Excel 4.0 macro in a formula, you need to create a name referencing the macro. Here's how:

  1. On the Formulas tab, in the Defined Names group, click Name Manager. Or simply press the Ctrl + F3 shortcut.
  2. In the Name Manager dialog window, click the New…
  3. In the New Name dialog window, type some meaningful name, say GetLinks, in the Name box and the following formula in the Refers to box: =LINKS()
  4. Click OK.

How to find links in Excel and break external links (21)

For more detailed instructions, please see How to create a name in Excel.

Step 2. Use the newly create name in a formula

Now that you have a name that references the macro, you just need to put the name in a formula. Depending on your Excel version, the formula will take a different form.

In Excel 365:

In the topmost cell of the destination range, enter this formula:

=TRANSPOSE(GetLinks)

GetLinks (or any other name that you utilized for referencing the macro) returns a horizontal spill range of all the external links in the workbook. The TRANSPOSE function rotates rows to columns and outputs a vertical list that is easier to read.
How to find links in Excel and break external links (22)

To arrange the list in alphabetical order, put the above formula inside the SORT function:

=SORT(TRANSPOSE(GetLinks))

Please remember that this solution only works in Excel 365 that has a new calculation engine supporting dynamic arrays.

In Excel 2019 - 2007:

In pre-dynamic versions of Excel, use the GetLinks name for the array argument of the classic INDEX function. To make the solution more user-friendly, you can wrap the construction in IFERROR to take care of situations when the formula is copied to more cells than there are external references in your workbook:

=IFERROR(INDEX(GetLinks, ROW(A1)), "")

The formula goes to the first cell (A2), and then you drag it down to the below cells:
How to find links in Excel and break external links (23)

Important notes:

  • Because this solution uses macros, the file must be saved as a Macro-Enabled Workbook (.xlsm).
  • Excel macros do not execute nor update automatically. To refresh a list of links, press the Ctrl + Alt + F9 keys shortcut, which recalculates all formulas in all open workbooks.

VBA macro to get a list of external links

If you have nothing against using macros in your worksheets, the following VBA code can find and list down all links to external sources in a workbook automatically:

Sub Get_Links() Dim links As Variant links = ActiveWorkbook.LinkSources(xlExcelLinks) If Not IsEmpty(links) Then Sheets.Add For i = 1 To UBound(links) Cells(i, 1).Value = links(i) Next i Else MsgBox "No external links are found.", vbInformation, "Find Links" End IfEnd Sub

To add the code to your workbook, do the following:

  1. Press Alt + F11 to open the Visual Basic Editor.
  2. On the left pane, right-click ThisWorkbook, and then click Insert > Module.
  3. Paste the above code in the Code window.

For the detailed steps, please see How to insert VBA code in Excel.

To run the macro, press either Alt + F8 in a workbook or F5 in the VBA Editor.

For more information, please see How to run macro in Excel.

As the result, you will get a list of external sources in a new sheet:
How to find links in Excel and break external links (24)

Find cells with external links using VBA

If your goal is to get a complete list of all external references in a workbook including the addresses of the cells containing the links, the following code can be helpful. Here, we utilize the LinkSources method to get all source workbooks and the LinkInfo method to identify their status. The status of a link is determined as described on this page:
https://docs.microsoft.com/en-us/office/vba/api/excel.xllinkstatus

Sub Cells_With_Links() linksDataArray = ActiveWorkbook.LinkSources(xlExcelLinks) Dim reportHeaders() As String Dim rangeCur As Range Dim sheetCur As Worksheet Dim rowNo As Integer Dim linkFilePath, linkFilePath2, linkFileName As String Dim linksStatusDescr() As String 'https://docs.microsoft.com/en-us/office/vba/api/excel.xllinkstatus Dim sheetReportName As String sheetReportName = "All Links report" linksStatusDescr = Split("No errors/File missing/Sheet missing/Status may be out of date/Not yet calculated/Unable to determine status/Not started/Invalid name/Not open/Source document is open/Copied values", "/") reportHeaders = Split("Worksheet,Cell,Formula,Workbook,Link Status", ",") rowNo = 1 'Header row If Not IsEmpty(linksDataArray) Then Application.ScreenUpdating = False Application.Calculation = xlCalculationManual If Evaluate("ISREF('" & sheetReportName & "'!A1)") Then ActiveWorkbook.Worksheets(sheetReportName).Cells.Clear Else Sheets.Add.Name = sheetReportName End If Set sheetReport = ActiveWorkbook.Worksheets(sheetReportName) For indI = 0 To UBound(reportHeaders) sheetReport.Cells(rowNo, indI + 1) = reportHeaders(indI) Next For Each sheetCur In ActiveWorkbook.Worksheets If sheetCur.Name <> sheetReport.Name Then For Each rangeCur In sheetCur.UsedRange If rangeCur.HasFormula Then For indI = LBound(linksDataArray) To UBound(linksDataArray) linkFilePath = linksDataArray(indI) 'LinkSrouces returns the full file path with the file name linkFileName = Right(linkFilePath, Len(linkFilePath) - InStrRev(linkFilePath, "\")) 'extract only the file name linkFilePath2 = Left(linksDataArray(indI), InStrRev(linksDataArray(indI), "\")) & "[" & linkFileName & "]" 'the file path with the workbook name in square brackets If InStr(rangeCur.Formula, linkFilePath) Or InStr(rangeCur.Formula, linkFilePath2) Then rowNo = rowNo + 1 With sheetReport .Cells(rowNo, 1) = sheetCur.Name .Cells(rowNo, 2) = Replace(rangeCur.Address, "$", "") .Hyperlinks.Add Anchor:=.Cells(rowNo, 2), Address:="", SubAddress:="'" & sheetCur.Name & "'!" & rangeCur.Address .Cells(rowNo, 3) = "'" & rangeCur.Formula .Cells(rowNo, 4) = linkFilePath .Cells(rowNo, 5) = linksStatusDescr(ActiveWorkbook.LinkInfo(CStr(linkFilePath), xlLinkInfoStatus)) End With Exit For End If Next indI For Each namedrangeCur In Names If InStr(rangeCur.Formula, namedrangeCur.Name) Then rowNo = rowNo + 1 linkFilePath = "" If 0 < InStr(namedrangeCur.RefersTo, "[") Then linkFilePath = Replace(Split(Right(namedrangeCur.RefersTo, Len(namedrangeCur.RefersTo) - 2), "]")(0), "[", "") End If With sheetReport .Cells(rowNo, 1) = sheetCur.Name .Cells(rowNo, 2) = Replace(rangeCur.Address, "$", "") .Hyperlinks.Add Anchor:=.Cells(rowNo, 2), Address:="", SubAddress:="'" & sheetCur.Name & "'!" & rangeCur.Address .Cells(rowNo, 3) = "'" & rangeCur.Formula If 0 < Len(linkFilePath) Then .Cells(rowNo, 4) = linkFilePath .Cells(rowNo, 5) = "'" & ActiveWorkbook.LinkInfo(CStr(linkFilePath), xlLinkInfoStatus) Else .Cells(rowNo, 4) = "Unknown" .Cells(rowNo, 5) = "Unknown" End If End With Exit For End If Next namedrangeCur End If Next rangeCur End If Next Columns("A:E").EntireColumn.AutoFit Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic Else MsgBox "No external links" End IfEnd Sub

The results are output in a new worksheet named All Links report. Column B contains hyperlinks to the cells with outside links.
How to find links in Excel and break external links (25)

To make use of the code straight away, you can download our sample workbook at the end of the post. The workbook contains the above code as well as the detailed step-by-step instructions on how to run it.

Find all external links in a workbook in a click

Reading the previous examples, perhaps you were wondering why simple things need to be made so complicated. We also asked that question to ourselves… and implemented a one-click solution for this task.

With Ultimate Suite installed in your Excel, finding all links in a workbook takes a single click on the Find Links button:
How to find links in Excel and break external links (26)

By default, the tool looks for all links: internal, external and web pages. To display only external references, select this option in the drop-down list and click the Refresh button.
How to find links in Excel and break external links (27)

To show only broken links, just put a tick in the corresponding check box.

To get to a cell that references external data, click the cell address on the pane.

Simple things should be kept simple! :)

That's how to find links to external sources in Excel. I thank you for reading and hope to see you on our blog next week!

Available downloads:

Ultimate Suite 14-day fully-functional version (.exe file)
VBA codes to find external links (.xlsm)

You may also be interested in:

  • How to use HYPERLINK function in Excel
  • How to create, change and remove Excel hyperlinks
  • How to make and use Excel cell references
  • How to delete multiple hyperlinks at once
  • How to find and fix broken links in Excel
How to find links in Excel and break external links (2024)

FAQs

How to find links in Excel and break external links? ›

In the Edit Links dialog box, in the Source list, click the link that you want to break. You can select individual workbooks with Ctrl+click, or all of them with Ctrl+A. Click Break Link.

How do I break all external links in Excel workbook? ›

In the Edit Links dialog box, in the Source list, click the link that you want to break. You can select individual workbooks with Ctrl+click, or all of them with Ctrl+A. Click Break Link.

How do I find links to external sources in Excel? ›

Go to the "Data" tab in the Excel ribbon, and click on "Edit Links" in the "Connections" group. The "Edit Links" dialog box will open, which shows all the linked workbooks that are used in the current workbook. This dialog box will show you all the external links as well as the internal links.

How to find ghost external links in Excel? ›

How to identify external links in Excel objects
  1. On the Hometab, in the Formats group, click Find & Select > Go to Special. ...
  2. In the Go To Special dialog box, select Objects and click OK. ...
  3. Press the Tab key to cycle through the selected objects and check each individual object for references to other workbooks.
Mar 13, 2023

How do I remove external Data Connections in Excel? ›

On the Tools menu, click Data Connections. In the Data connections for the form template list, click the data connection that you want to remove. Click Remove.

How do I find links between cells in Excel? ›

Go to Formulas tab > Formulas Auditing > Trace Dependents. Click on the Trace Dependents button to see the cells that are affected by the active cell. It will show a blue arrow that links the active cell and the other cells related to the selected cell.

How do I find broken external links? ›

Simply put your site URL into Ahrefs Site Explorer, go to the “Backlinks” report, and click “Broken” to see the strongest broken backlinks of your website. Alternatively, you can also go to “Best by links” report, and apply the “404 not found” filter in “HTTP codes.”

How do I break all hyperlinks in Excel? ›

Select all cells that contain hyperlinks, or press Ctrl+A to select all cells. Right-click, and then click Remove Hyperlinks.

How do you force a link break in Excel? ›

To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break. Double-click the cell in which you want to insert a line break (or select the cell and then press F2).

How do you find embedded objects in Excel? ›

How to quickly find embedded objects in Excel. On Windows or Mac navigate to the Home tab of the ribbon near the right-hand side click the down arrow next to Find & Select then choose Go To Special… This will open up the Go To Special dialog shown below. Choose Objects from the Select list and then click OK.

How to find broken links in Excel? ›

Open the workbook that contains the broken link. On the Data tab, click Edit Links. The Edit Links command is unavailable if your workbook doesn't contain links. In the Source file box, select the broken link that you want to fix.

How do I see all hyperlinks in Excel? ›

Open the desired worksheet.
  1. In the Home tab, move to the “Editing ribbon” and select “Replace” option. ...
  2. Then it allows you to select the cells with hyperlinks. ...
  3. And click the “Find all” option to list all the hyperlinks. ...
  4. Click on "Insert" from the toolbar menu and choose "Module."
Dec 22, 2023

How do I break a phantom link in Excel? ›

Check for Conditional Formatting Links
  1. Go to the Conditional Formatting Rules Manager.
  2. Select “This Worksheet” from the drop down.
  3. Check each Rule to ensure they are referencing data in an external file.
  4. Amend or Delete the Rule to remove the Link.
  5. Repeat steps above for the remaining worksheets in the file.
Jan 9, 2024

How do I remove ghost Data in Excel? ›

Use the Document Inspector to Remove Hidden Data

To open the Document Inspector, click File > Info > Check for Issues > Inspect Document. The Excel Document Inspection window shown below opens up. Click Inspect to identify hidden content, and then click Remove All to remove the item of your choice.

How do I see external data connections in Excel? ›

To open the Existing Connections dialog box, select Data > Existing Connections. You can display all the connections available to you and Excel tables in your workbook. You can open a connection or table from the list and then use the Import Data dialog box to decide how you want to import the data.

How do I remove a link from Excel data? ›

How to remove links in Excel
  1. Navigate to the "Data" tab in the top banner.
  2. Find the "Queries & Connections" group.
  3. Click "Edit Links."
  4. Find the link you want to remove from the "Source" list.
  5. To select multiple links, hold the "Crtl" button on your keyboard and click each link you want to remove.
  6. Choose "Break Link."
Jun 24, 2022

What is the shortcut key for break links in Excel? ›

The Edit Links window will open, listing all the sources to which all the worksheets in the active workbook have external links. Alternatively, use Alt + A + K or Alt + E + K as the break links in Excel shortcut to open the Edit Links window and access the Break Link option.

How to identify linked Data in Excel? ›

A great way to check for links between worksheets is by using the Workbook Relationship command in Excel. If Microsoft Office Professional Plus 2013 is installed on your computer, you can use this command, found on the Inquire tab, to quickly build a diagram that shows how workbooks are linked to each other.

How do I find break links in Excel? ›

How to remove links in Excel
  1. Navigate to the "Data" tab in the top banner.
  2. Find the "Queries & Connections" group.
  3. Click "Edit Links."
  4. Find the link you want to remove from the "Source" list.
  5. To select multiple links, hold the "Crtl" button on your keyboard and click each link you want to remove.
  6. Choose "Break Link."
Jun 24, 2022

How do I see external Data connections in Excel? ›

To open the Existing Connections dialog box, select Data > Existing Connections. You can display all the connections available to you and Excel tables in your workbook. You can open a connection or table from the list and then use the Import Data dialog box to decide how you want to import the data.

How do I remove a hidden hyperlink in Excel? ›

Select all cells that contain hyperlinks, or press Ctrl+A to select all cells. Right-click, and then click Remove Hyperlinks.

Top Articles
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 6083

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.