Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to find and list all links (external references) in Excel?

In Excel, you refer to the contents of cells in another workbook by creating an external reference. But when you want to list all links of a workbook in Excel, it seems hard to find out and list all external references (links). The following tricky way will help you find out and list all links in workbook quickly.

Find and list all links with Find command

Find and list all links with VB macro

Find and list all links with Kutools for Excel


Find all external links in a worksheet and break them at once:

In Excel worksheet, if you want to find and break all external links, Kutools for Excel's Find and Break Broken Links feature can help you quickly find all kinds of links,and then you can break them as you need.

doc list all links 7

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


arrow blue right bubble Find and list all links with Find command


Because external links contains bracket [ sign, we can find out the external links if we can get all bracket signs in the whole workbook.

1. Click Home > Find & Select > Find to open the Find and Replace dialog box. You can also open the Find and Replace dialog box with pressing Ctrl + F keys.

2. In the Find What: box, enter the left part of bracket sign "[".

doc list all links 1

3. Click Options, in the Within drop down list, choose Sheet or Workbook that you want to find the links from.  See screenshot:

doc list all links 2

4. And then click Find All button. Then it lists all external references in the Find and Replace dialog box immediately. Press Ctrl + A  to select all link cells as following screeshot shown:

doc list all links 3

The left part of bracket sign can find out the external links in the whole workbook. If you want to find out all kinds of links, including the internal links and external links, you can enter the exclamation sign "!" in the Find what: box.


arrow blue right bubble Find and list all links with VB macro

The following VBA macro can help us list all linked source workbooks in a new worksheet of current workbook.

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following macro in the Module Window.

VBA: List all links in Excel.

Sub ListLinks()
    Dim xSheet As Worksheet
    Dim xRg As Range
    Dim xCell As Range
    Dim xCount As Long
    Dim xLinkArr() As String
    On Error Resume Next
    For Each xSheet In Worksheets
        Set xRg = xSheet.UsedRange.SpecialCells(xlCellTypeFormulas)
        If xRg Is Nothing Then GoTo LblNext
        For Each xCell In xRg
            If InStr(1, xCell.Formula, "[") > 0 Then
                xCount = xCount + 1
                ReDim Preserve xLinkArr(1 To 2, 1 To xCount)
                xLinkArr(1, xCount) = xCell.Address(, , , True)
                xLinkArr(2, xCount) = "'" & xCell.Formula
           End If
        Next
LblNext:
    Next
    If xCount > 0 Then
        Sheets.Add(Sheets(1)).Name = "Link Sheet"
        Range("A1").Resize(, 2).Value = Array("Location", "Reference")
        Range("A2").Resize(UBound(xLinkArr, 2), UBound(xLinkArr, 1)).Value = Application.Transpose(xLinkArr)
        Columns("A:B").AutoFit
    Else
        MsgBox "No links were found within the active workbook.", vbInformation, "KuTools for Excel"
    End If
End Sub

3. Press the F5 key to run this macro. Then it creates a new worksheet named as Link Sheet and list all links location and linked source workbooks' names and saving paths in it at once. See screenshot:

doc list all links 4


arrow blue right bubble Find and list all links with Kutools for Excel

With Kutools for Excel’s Find and Break broken Links, you can find all the external links of the active worksheet, at the same time, you can break the specific links as you need.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

If you have installed Kutools for Excel, please do as this:

1. Active the worksheet that you want to find the links, and click Kutools > Link > Find and Break Broken Links, see screenshot:

doc list all links 5

2. In the Find and Break broken Links dialog box, click Filter drop down list to choose All links, and all links in the active worksheet are listed, you can view the links status as well, OK stands for the link is valid, Error means the link is broken.

doc list all links 6

Notes:

1. If the View cell option is checked, when you click on the link in the list. It will find and navigate to the specific cell which contains the link in the worksheet.

2. And if you want to break a link, you can select the link from the list, then click Break link.

Click to Download Kutools for Excel and free trial Now!

If you want to know more about this feature, please click Find and Break broken Links.


arrow blue right bubble Find and list all links with Kutools for Excel

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 60 days. Download the free trial now!


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Ryan · 1 years ago
    Hi, would it be possible to add the external links in the above VBA code to a particular cell range in a sheet in the workbook instead of adding a new sheet?
  • To post as a guest, your comment is unpublished.
    Jeff · 2 years ago
    Thank you so much. This problem has bedeviled me for years. The simple but effective find "left bracket" worked perfectly for my needs.
  • To post as a guest, your comment is unpublished.
    Wild Bill · 2 years ago
    "Because external links contains bracket [ sign,"
    Sorry, that's not exactly true. MVPs Wyman and Walkenbach even get that wrong (perhaps many others too.)

    This is one clear exception
    =VLOOKUP(A1,'C:\FOO.XLS'!SomeRangeName,2,FALSE)
  • To post as a guest, your comment is unpublished.
    Rob · 2 years ago
    Worked perfectly. I was constantly getting an "update external links" question, and didn't know that I had any. Using the Find, [, and Options of find in Workbook found all of them! Thanks, Rob
  • To post as a guest, your comment is unpublished.
    Marilyn · 2 years ago
    Is it possible to get a list of all the external links that are connected to one source document. I'm guessing that somewhere in the source document, this information should be available, but I've been unable to find it.
  • To post as a guest, your comment is unpublished.
    Jim · 2 years ago
    Simply remove the data validation by selecting the whole sheet and click on new validation rule. It will delete all old validation rules, even if you do not enter a new one.

    There can also be links in 'named ranges' and hidden named ranged. Google it to find the solutions.
  • To post as a guest, your comment is unpublished.
    Danny Saville · 2 years ago
    I had an Excel file that when opened displayed a message regarding a missing external link.
    No such link could be found and various tools- Kutools, FormulaDesk etc [b]did find nothing[/b].
    Finally- I solved the problem by opening the xlsx file as zip+xml and deleting the folder dealing with external links (if you want more details- ask me).
  • To post as a guest, your comment is unpublished.
    Ed · 3 years ago
    Shazam! This tip is awesome.
  • To post as a guest, your comment is unpublished.
    Mats Lind · 3 years ago
    Great, thanks! When those links are found, make sure to swich any direct external references to named references so they will point to the right location even if the layout of the linked cells change, see: http://msexcelandvba.blogspot.se/
  • To post as a guest, your comment is unpublished.
    Mach3 · 3 years ago
    All options above didn't help me with getting rid of an external link.
    But i found a solution for the elimination of my external link.
    Take a also a look at the NameManager (Menu - Formulas). In the column Refers to you will see the location where Names refer to.
  • To post as a guest, your comment is unpublished.
    Joe Straub · 4 years ago
    The VBA macro above worked beautifully. Thanks a million!
  • To post as a guest, your comment is unpublished.
    RP · 4 years ago
    @Joniru - To echo @ytrewq and @Scnider, you rock. Would have never thought to look at conditional formatting if I hadn't read your comment. I am finally free if this annoying error.
  • To post as a guest, your comment is unpublished.
    Amy · 4 years ago
    Hello, does anyone has the vba code to export the results in the find and replace dialog box to another workbook or worksheet?
  • To post as a guest, your comment is unpublished.
    BeetaSkomb · 4 years ago
    There is one type of link that none of these solutions will help you find and the Excel help and "Edit Links" dialog are no use either. There are external links in Data Validation and Conditional Formatting which are not contained within cell formulae, so the "Find" dialog cannot be used. Here is a fail proof method of discovering with absolute certainty all external links in a workbook no matter what type of link they are:

    1. Save your workbook (always No.1)
    2. Save a COPY of the workbook as an XML based format (XML Spreadsheet 2003) - will lose features incompatible with XML (but accept it)
    3. CLOSE the now open XML spreadsheet copy
    4. Open the newly created XML Spreadsheet using a TEXT editor, like Notepad++ (don't use Windows Notepad.exe)
    5. Run a text search in the XML-based copy for the "" or "" tags, and also the "RefersTo=" text, and voila! There is your external reference!
    6. The other place to look is in the Named Ranges dialog - you will quickly see of any Named Ranges are pointing to an external file. The above method of searching an XML copy is very useful for finding Data Validation or Conditional Formatting settings which refer to an external file - these are very hard to find manually.
  • To post as a guest, your comment is unpublished.
    Sunadh · 4 years ago
    Thanks !!!! it helped out ... Able to work with ease...
  • To post as a guest, your comment is unpublished.
    Carmen · 4 years ago
    Excellent post. I was having an issue finding old links that were not needed and found the exact sheets they were in. I deleted the sheets and problem solved. Thanks!
  • To post as a guest, your comment is unpublished.
    DaveTom · 4 years ago
    Well done STevo, your XML method was the only one that worked for me. I opened it in notepad and there it was
  • To post as a guest, your comment is unpublished.
    STevo · 5 years ago
    'Find' does not search Data Validation settings, but these can contain invalid links.

    Here's another way that works pretty well:
    1. Save a copy of your workbook as an XML Spreadsheet;
    2. Open the XML Spreadsheet in 'XML Notepad' (Microsoft) or any XML/text editor;
    3. Search for part or all of the invalid link (URL). You should see which tab and which cells contain the invalid link and what type of reference it is (Data Validation, Advanced Filter, Named Range etc.)
    4. Armed with this you can go back to your original XL file and change/delete those invalid references.

    HTH
    • To post as a guest, your comment is unpublished.
      green_beer · 5 years ago
      [quote name="STevo"]'Find' does not search Data Validation settings, but these can contain invalid links.

      Here's another way that works pretty well:
      1. Save a copy of your workbook as an XML Spreadsheet;
      2. Open the XML Spreadsheet in 'XML Notepad' (Microsoft) or any XML/text editor;
      3. Search for part or all of the invalid link (URL). You should see which tab and which cells contain the invalid link and what type of reference it is (Data Validation, Advanced Filter, Named Range etc.)
      4. Armed with this you can go back to your original XL file and change/delete those invalid references.

      HTH[/quote]

      Thanks STevo ... This hint saved me a ton of time.
    • To post as a guest, your comment is unpublished.
      Charels · 5 years ago
      Stevo I was able to find the link using this methed however i still have no clue where it is or how to fix it any ideas? (encapsulated the bad link with ***)





      This is the template that must be used to estimate all projects.
      V
      Ch
      2012-07-25T20:41:12Z
      2014-08-20T15:53:34Z
      15.00


      0x0101002FAC2859101EBD408B4E817052597CDA
      baacc0fc-fbe2-4ba9-b022-3c507d1c4d6b






      *** https://sp.vectorform.com/MVP.xlsx ***
      Estimator
      FTE
      Sheet3
      Sheet4
      FullRA
      Lists
      Sheet1
      • To post as a guest, your comment is unpublished.
        Mike C · 5 years ago
        Do you use macros? I couldn't find mine using the find function so I came here looking for another solution and found the message above (thanks by the way). However even after I removed external references in my data validation stuff using the XML method, Excel still says I have external links! Very frustrating until I realise that I have buttons that actually link to macros of another spreadsheet. So once I removed those it no longer says I have external links (woohoo)
  • To post as a guest, your comment is unpublished.
    Dan R · 5 years ago
    After some searching, I found some links in my data validation sources & some buttons that were assigned to macros. I had to close Excel completely for the link to disappear from the "Edit links" menu.
  • To post as a guest, your comment is unpublished.
    ytrewq · 5 years ago
    Joniru, I could kiss you... This has been driving me nuts for weeks! Never thought to look in the conditional formatting
    • To post as a guest, your comment is unpublished.
      Nick · 2 years ago
      Thanks for the lead! Mine were actually in the Name Manager! Hopefully this post will help some other unfortunate soul.
    • To post as a guest, your comment is unpublished.
      Scnider · 5 years ago
      Joniru, you're a genius!
      Conditional formatting all along... thank you!!!
  • To post as a guest, your comment is unpublished.
    Daymond Cox · 5 years ago
    Jonriu - or ANYONE (Urgent Request)
    I have KuTools, used that Break Hyperlinks and Find break broken links tools, nothing has helped.
    I used the Find function but did not resolve it.
    I have a spreadsheet with over 140 tabs of data, roughly 80,000 cells.

    Does this mean I need to had check every cell for cell formatting rules? Is there a Macro I can run? I have hyperlinks to temporary files that neither the Find or KuTools tools can "find" or Break. Is this an urgent request.
  • To post as a guest, your comment is unpublished.
    Kirstie · 5 years ago
    Running the VBA macro was the only thing that worked for me and without this, I would never have found it! Thank you for solving this for me! :lol:
    It has cured my severe frustration!
  • To post as a guest, your comment is unpublished.
    Joniru · 5 years ago
    After lots of trying and failing, I found the reference in the cell formatting rules!! :P
    (the place where you are able to make a cell change colour based on the content of another cell)
    • To post as a guest, your comment is unpublished.
      Chuck83 · 2 years ago
      JONIRU, YOU ARE A BOSS!

      Spent two days on this but could have wasted a lot more time.
      Xml trick did not work as excel told me file did not have any xml mappings
      Found link to named range in another document.
      Thanks Soooooooo Much.
    • To post as a guest, your comment is unpublished.
      Sabina · 3 years ago
      Thank you Joniru! I looked everywhere for that hidden link, including comments... your tip helped me find that link after hours of searching!
    • To post as a guest, your comment is unpublished.
      MIKEF · 3 years ago
      Saviour! Thank goodness I found this page otherwise I'd have never got to the bottom of it. Thanks Joniru.
    • To post as a guest, your comment is unpublished.
      abrassil · 3 years ago
      Jonru your tip helped me out a lot!!
  • To post as a guest, your comment is unpublished.
    Leslie Dunn · 5 years ago
    Thank you! I used the Find command with the workbook option, which was great because my file has lots of tabs. Perfect!
  • To post as a guest, your comment is unpublished.
    BenGman · 5 years ago
    Try just copy/paste the value that is in the cell. The link is useless, but the data is still needed.
  • To post as a guest, your comment is unpublished.
    M Cooper · 5 years ago
    After running the VBA List all Links Macro, one link came up."J:\Documents and Settings\My Documents\Consulting\APRTZ.xls". This link is to a file on the hard drive of the original computer where the file was first saved. I can't seem to delete this link, it wants me to save the file as a *.xlsm file. Any suggestions would be greatly appreciated. Thanks. Michael