ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Workbook Links (https://www.excelbanter.com/excel-worksheet-functions/30896-workbook-links.html)

Jim

Workbook Links
 
I would like to simply find which cells in my spreadsheet have links to
another workbook. What can I do to identify the address of cells that have
links to an external workbook. Thanks, Jim

Dave Peterson

When I can't find links, I'll use Bill Manville's FindLink program:
http://www.oaltd.co.uk/MVP/Default.htm

Jim wrote:

I would like to simply find which cells in my spreadsheet have links to
another workbook. What can I do to identify the address of cells that have
links to an external workbook. Thanks, Jim


--

Dave Peterson

Barb R.

There's got to be an easier way than this, but I'd look for [ or ] in the
cells.

"Jim" wrote:

I would like to simply find which cells in my spreadsheet have links to
another workbook. What can I do to identify the address of cells that have
links to an external workbook. Thanks, Jim


JMB

Here's another macro that will find all external links in the workbook.


Sub FindLink()
Dim Report As Object
Set Report = Sheets.Add
Dim LinkList As Variant
Dim LinkPath As Variant

LinkList = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(LinkList) Then
For i = 1 To UBound(LinkList)
LinkPath = Split(LinkList(i), "\", -1, vbTextCompare)
For Each x In Worksheets
If x.Name < Report.Name Then
For Each y In x.UsedRange
If InStr(1, y.Formula, LinkPath(UBound(LinkPath)), vbTextCompare) 0
Then
Report.Select
ActiveCell.Value = x.Name & y.Address
ActiveCell.Offset(0, 1).Value = LinkList(i)
ActiveCell.Offset(1, 0).Select
End If
Next y
End If
Next x
Next i
End If

End Sub


"Jim" wrote:

I would like to simply find which cells in my spreadsheet have links to
another workbook. What can I do to identify the address of cells that have
links to an external workbook. Thanks, Jim



All times are GMT +1. The time now is 11:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com