跳到主要内容

如何在Excel中查找和列出所有链接(外部引用)?

在 Excel 中,您可以通过创建外部引用来引用另一个工作簿中单元格的内容。 但是,当您想在 Excel 中列出工作簿的所有链接时,似乎很难找到并列出所有外部引用(链接)。 本文中的巧妙方法将帮助您快速找出并列出工作簿中的所有链接。

使用“查找”命令查找并列出所有链接

查找并列出所有带有VB宏的链接

查找并列出与 Kutools for Excel 的所有链接


箭头蓝色右气泡 使用“查找”命令查找并列出所有链接

因为外部链接包含括号 [ 符号,如果可以在整个工作簿中获得所有括号符号,则可以查找外部链接。

1. 点击 主页 > 查找和选择 > 找到最适合您的地方 打开 查找和替换 对话框。 您也可以打开 查找和替换 按下对话框 按Ctrl + F 键。

2. 找什么: 框中,输入括号符号“[".

doc列出所有链接1

3. 点击 附加选项下拉列表,选择 or 工作簿 您要从中查找链接的位置。 看截图:

doc列出所有链接2

4. 然后点击 找到所有 按钮。 然后列出所有外部参考 查找和替换 对话框。 按 按Ctrl + A  选择所有链接单元格,如下所示:

doc列出所有链接3

括号符号的左侧部分可以找到整个工作簿中的外部链接。 如果要查找各种链接,包括内部链接和外部链接,则可以输入感叹号“!“在 查找内容:盒子。


箭头蓝色右气泡 查找并列出所有带有VB宏的链接

下面的VBA宏可以帮助我们在当前工作簿的新工作表中列出所有链接的源工作簿。

1. 按住 ALT + F11 键,并打开“ Microsoft Visual Basic应用程序”窗口。

2。 点击 插页 > 模块,然后将以下宏粘贴到“模块窗口”中。

VBA:列出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. F5 运行此宏的键。 然后创建一个新的工作表,名为 链接表 并列出所有链接位置和链接的源工作簿的名称,并立即在其中保存路径。 看截图:

doc列出所有链接4


箭头蓝色右气泡 查找并列出与 Kutools for Excel 的所有链接

Kutools for Excel查找并断开断开的链接,您可以找到活动工作表的所有外部链接,同时,可以根据需要断开特定的链接。

如果你已经安装 Kutools for Excel,请这样做:

1. 激活要查找链接的工作表,然后单击 库工具 > 链接 > 查找并断开断开的链接,请参见屏幕截图:

doc列出所有链接5

2. 查找并断开断开的链接 对话框,单击 筛选器 下拉列表选择 所有链接,并且列出了工作表中的所有链接,您也可以查看链接状态, OK 表示链接有效, 误差 表示链接已断开。

doc列出所有链接6

:

1。 如果 查看单元格 当您单击列表中的链接时,选中该选项。 它将找到并导航到包含工作表中链接的特定单元格。

2.如果要断开链接,可以从列表中选择链接,然后单击 断开链接.

点击下载Kutools for Excel并立即免费试用!

如果您想进一步了解此功能,请单击 查找并断开断开的链接.


箭头蓝色右气泡 查找并列出与 Kutools for Excel 的所有链接

Kutools for Excel 包括300多个便捷的Excel工具。 30天免费试用,不受限制。 立即下载免费试用版!

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (40)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Can a tab name have a link?
This comment was minimized by the moderator on the site
Hoi, ik zit er over te denken om een excel cursus te volgen bij computertraining.nl. Heeft iemand daar ervaring mee?
This comment was minimized by the moderator on the site
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?
This comment was minimized by the moderator on the site
Thank you so much. This problem has bedeviled me for years. The simple but effective find "left bracket" worked perfectly for my needs.
This comment was minimized by the moderator on the site
"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)
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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 did find nothing. 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).
This comment was minimized by the moderator on the site
Shazam! This tip is awesome.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations