跳到主要内容

如何在Excel中使用超链接创建下拉列表?

在Excel中,添加下拉列表可以帮助我们高效而轻松地解决我们的工作,但是,如果您曾经尝试使用超链接创建下拉列表,则当您从下拉列表中选择URL地址时,它将打开超链接。自动吗? 本文,我将讨论如何在Excel中使用激活的超链接创建下拉列表。

通过使用公式创建带有超链接的下拉列表

通过使用组合框创建带有超链接的下拉列表


通过使用公式创建带有超链接的下拉列表

没有直接方法可以在Excel中使用激活的超链接创建下拉列表,但是,您可以插入公式来激活从下拉列表中选择的超链接,请执行以下操作:

创建下拉列表后,请输入以下公式: = HYPERLINK(D2,“转到网站!”) (D2 是下拉列表单元格旁边的E2单元格中的下拉列表单元格,然后按 输入 键,然后从下拉列表中选择一个URL超链接,然后单击公式单元格,将打开该超链接。

doc下拉列表超链接1


通过使用组合框创建带有超链接的下拉列表

实际上,您还可以使用组合框来创建带有超链接的下拉列表,并且当您从组合框中选择一个超链接时,该链接将立即被激活。 请执行以下操作:

首先,请为您的超链接列表和链接的单元格创建两个范围名称。

1。 给您的超链接列表一个范围名称“超链接”,并命名一个空白单元格“链接单元”,它是组合框值中链接到的单元格 名称框,请参见屏幕截图:

doc下拉列表超链接2

doc下拉列表超链接3

其次,创建一个组合框并设置控件的格式。

2. 点击 开发商 > 插页 > 组合框,然后根据需要拖动光标以绘制一个组合框。

doc下拉列表超链接4

Tips:如果没有 开发商 标签上的标签,请阅读本文 如何在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中使用超链接创建下拉列表

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 (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