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 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.
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!
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 "[".
3. Click Options, in the Within drop down list, choose Sheet or Workbook that you want to find the links from. See screenshot:
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:
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.
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:
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:
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.
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.
If you want to know more about this feature, please click Find and Break broken Links.
Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 60 days. Download the free trial now!
Recommended Productivity Tools
Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.
Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!
300 New Features for Excel, Make Excel Much Easy and Powerful:
- Merge Cell/Rows/Columns without Losing Data.
- Combine and Consolidate Multiple Sheets and Workbooks.
- Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
- Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
- More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 7 months agoHi, 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.· 1 years agoThank 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.· 1 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
To post as a guest, your comment is unpublished.· 1 years agoWorked 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.· 2 years agoIs 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.