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)
Top Articles
Transponder vs Non-transponder Keys: What’s the Difference?
What Food To Buy When Staying In An Airbnb With Your Family - 7 Wayfinders
$4,500,000 - 645 Matanzas CT, Fort Myers Beach, FL, 33931, William Raveis Real Estate, Mortgage, and Insurance
Hotels Near 6491 Peachtree Industrial Blvd
Ron Martin Realty Cam
Brady Hughes Justified
Combat level
From Algeria to Uzbekistan-These Are the Top Baby Names Around the World
Doublelist Paducah Ky
Cumberland Maryland Craigslist
The Best Classes in WoW War Within - Best Class in 11.0.2 | Dving Guides
Readyset Ochsner.org
The Shoppes At Zion Directory
ocala cars & trucks - by owner - craigslist
10 Free Employee Handbook Templates in Word & ClickUp
Gmail Psu
Condogames Xyz Discord
Dallas Cowboys On Sirius Xm Radio
Arre St Wv Srj
St Maries Idaho Craigslist
De beste uitvaartdiensten die goede rituele diensten aanbieden voor de laatste rituelen
Accident On May River Road Today
Cocaine Bear Showtimes Near Regal Opry Mills
Joann Ally Employee Portal
Google Doodle Baseball 76
Ups Print Store Near Me
Dallas Mavericks 110-120 Golden State Warriors: Thompson leads Warriors to Finals, summary score, stats, highlights | Game 5 Western Conference Finals
Exl8000 Generator Battery
Craigslist Panama City Beach Fl Pets
Tokyo Spa Memphis Reviews
Medline Industries, LP hiring Warehouse Operator - Salt Lake City in Salt Lake City, UT | LinkedIn
Buhl Park Summer Concert Series 2023 Schedule
Rek Funerals
Chadrad Swap Shop
Tenant Vs. Occupant: Is There Really A Difference Between Them?
Today's Gas Price At Buc-Ee's
Toth Boer Goats
Wilson Tattoo Shops
Author's Purpose And Viewpoint In The Dark Game Part 3
The Sports Academy - 101 Glenwest Drive, Glen Carbon, Illinois 62034 - Guide
Espn Top 300 Non Ppr
Guy Ritchie's The Covenant Showtimes Near Look Cinemas Redlands
The top 10 takeaways from the Harris-Trump presidential debate
10 Bedroom Airbnb Kissimmee Fl
Hy-Vee, Inc. hiring Market Grille Express Assistant Department Manager in New Hope, MN | LinkedIn
Bunbrat
Bellin Employee Portal
Emmi-Sellers
Supervisor-Managing Your Teams Risk – 3455 questions with correct answers
Latest Posts
Article information

Author: Fr. Dewey Fisher

Last Updated:

Views: 6661

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Fr. Dewey Fisher

Birthday: 1993-03-26

Address: 917 Hyun Views, Rogahnmouth, KY 91013-8827

Phone: +5938540192553

Job: Administration Developer

Hobby: Embroidery, Horseback riding, Juggling, Urban exploration, Skiing, Cycling, Handball

Introduction: My name is Fr. Dewey Fisher, I am a powerful, open, faithful, combative, spotless, faithful, fair person who loves writing and wants to share my knowledge and understanding with you.