跳到主要內容

如何在Excel中使用超鏈接創建下拉列表?

在Excel中,添加下拉列表可以幫助我們高效而輕鬆地解決我們的工作,但是,如果您曾經嘗試使用超鏈接創建下拉列表,則當您從下拉列表中選擇URL地址時,它將打開超鏈接。自動嗎? 本文,我將討論如何在Excel中使用激活的超鏈接創建下拉列表。

通過使用公式創建帶有超鏈接的下拉列表

通過使用組合框創建帶有超鏈接的下拉列表


通過使用公式創建帶有超鏈接的下拉列表

沒有直接方法可以在Excel中使用激活的超鏈接創建下拉列表,但是,您可以插入公式來激活從下拉列表中選擇的超鏈接,請執行以下操作:

創建下拉列表後,請輸入以下公式: = HYPERLINK(D2,“轉到網站!”) (D2 是下拉列表單元格旁邊的E2單元格中的下拉列表單元格,然後按 Enter 鍵,然後從下拉列表中選擇一個URL超鏈接,然後單擊公式單元格,將打開該超鏈接。

doc下拉列表超鏈接1


通過使用組合框創建帶有超鏈接的下拉列表

實際上,您還可以使用組合框來創建帶有超鏈接的下拉列表,並且當您從組合框中選擇一個超鏈接時,該鏈接將立即被激活。 請執行以下操作:

首先,請為您的超鏈接列表和鏈接的單元格創建兩個範圍名稱。

1。 給您的超鏈接列表一個範圍名稱“超鏈接”,並命名為空白單元格“鏈接單元”,它是組合框值中鏈接到的單元格 名稱框,請參見屏幕截圖:

doc下拉列表超鏈接2

doc下拉列表超鏈接3

其次,創建一個組合框並設置控件的格式。

2. 點擊 開發者 > 插入 > 組合框,然後根據需要拖動光標以繪製一個組合框。

doc下拉列表超鏈接4

保養竅門:如果沒有 開發者 標籤上的標籤,請閱讀本文 如何在Excel 2007/2010/2013功能區中顯示/顯示開發人員選項卡? 激活它。

3。 插入組合框後,右鍵單擊它,然後選擇 格式控制格式控制 對話框,單擊 控制 標籤,然後輸入 超鏈接鏈接單元 您在步驟1中創建的範圍名稱 輸入範圍單元鏈接 文本框,請參見屏幕截圖:

doc下拉列表超鏈接5

4。 然後點擊 OK 按鈕以完成設置,右鍵單擊組合框,然後選擇 分配宏 從上下文菜單的 分配宏 對話框,單擊 全新 按鈕,請參見屏幕截圖:

doc下拉列表超鏈接6

5. 在彈出 適用於應用程序的Microsoft Visual Basic 窗口,請在腳本之間複製並粘貼以下代碼,請參見屏幕截圖:

VBA代碼:激活組合框中的超鏈接:

HyperLink_Index = Range("Linked_cell")
      If Range("HyperLinks").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Name <> "" Then
           Range("HyperLinks").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    End If

doc下拉列表超鏈接7

6. 然後保存此代碼,現在,當您從組合框中選擇一個超鏈接時,該超鏈接將自動打開。


演示:在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 (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I used the formula as indicated, but when I click on the second hyperlink in the drop down list, it takes me directly to my last hyperlink on the list. It's only the first hyperlink that works, the rest of the drop down list only takes me to the last hyperlink. How can I fix this so that each hyperlink in the list takes me to the correct hyperlink requested?
This comment was minimized by the moderator on the site
Is there a possibility to make this available for more than one drop down list without making a new macro for every combo box?

If I have a dropdown list for lets say Charlie with all the employees reporting under him and we have Bryan with all the employees reporting under him in a dropdown menu and when clicking a name on the dropdown menu it hyperlinks to the required sheet or file etc.

In a case where there's only 2 - no problem, but when there's c130 it can become unpleasant to name each separately, create a command button with it's own macro assigned.

Hope I've explained it understandably
This comment was minimized by the moderator on the site
is there a way to make the second option work with hyperlinks to another cell in the worksheet? I basically have an enormous spreadsheet with options in different categories and subcategories and I want to select a sub categorie in a drop down list then the link brings me to the right place in the sheet. Is this possible?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations