跳到主要內容

如何在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的所有鏈接

這款獨特的敏感免洗唇膜採用 Moisture WrapTM 技術和 Berry Mix ComplexTM 成分, Excel的Kutools查找並斷開斷開的鏈接,您可以找到活動工作表的所有外部鏈接,同時可以根據需要斷開特定的鏈接。

如果你已經安裝 Excel的Kutools,請這樣做:

1. 激活要查找鏈接的工作表,然後單擊 庫工具 > Link > 查找並斷開斷開的鏈接,請參見屏幕截圖:

doc列出所有鏈接5

2. 查找並斷開斷開的鏈接 對話框,單擊 篩選 下拉列表選擇 所有連結,並且列出了活動工作表中的所有鏈接,您還可以查看鏈接狀態, OK 表示鏈接有效, 錯誤 表示鏈接已斷開。

doc列出所有鏈接6

筆記:

1。 如果 查看單元格 當您單擊列表中的鏈接時,選中該選項。 它將找到並導航到包含工作表中鏈接的特定單元格。

2.如果要斷開鏈接,可以從列表中選擇鏈接,然後單擊 斷開鏈接.

點擊下載Kutools for Excel並立即免費試用!

如果您想進一步了解此功能,請單擊 查找並斷開斷開的鏈接.


箭頭藍色右氣泡 查找並列出Kutools for Excel的所有鏈接

Excel的Kutools 包括300多個便捷的Excel工具。 30天免費試用,不受限制。 立即下載免費試用版!

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為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