跳到主要内容

如何在Excel中快速创建动态依赖下拉列表?

我们大多数人可能可以使用Excel中的数据验证功能来创建下拉列表,但是有时我们需要链接的或动态的下拉列表,这意味着当您在下拉列表A中选择一个值并且您想要下拉列表B中要更新的值。在Excel中,我们可以使用 数据验证 功能和 间接 功能。 本教程将介绍如何在Excel中创建相关的下拉列表。


在 Excel 中创建动态依赖下拉列表

假设我有一个四列的表格,该表格指示四种食物:水果,食物,肉和饮料,并且在它们下面是特定的食物名称。 请参见以下屏幕截图:

现在,我需要创建一个包含食物的下拉列表,例如水果,食物,肉和饮料,第二个下拉列表将具有特定的食物名称。 如果选择食物,第二个下拉菜单将显示大米,面条,面包和蛋糕。 为此,请执行以下步骤:

1。 首先,我需要为这些列和第一个类别行创建一些范围名称。

(1.)在类别的第一行中创建一个范围名称,选择A1:D1,然后键入范围名称 食品名称框,然后按 输入 键。

(2.)然后,您需要按照上述步骤为每个列命名范围,如下所示:

Tips: -导航窗格:在Excel中的窗格中批量创建多个命名范围并列出
通常我们在Excel中一次只能定义一个名称范围。但在某些情况下,您可能需要创建多个命名范围。重复地一一定义名字一定很乏味。 Kutools for Excel 提供了这样一个实用程序来快速批量创建多个命名范围,并在 导航窗格 以方便查看和访问。


广告导航窗格名称

2。 现在,我可以创建第一个下拉列表,请选择一个空白单元格或要应用此下拉列表的列,然后单击 时间 > 数据验证 > 数据验证,请参见屏幕截图:

3。 在 数据验证 对话框,单击 个人设置 标签,选择 清单 来自 下拉列表,然后输入此公式 =食品来源 框。 看截图:

备注:您需要在公式中输入您命名的类别。

4. 点击 OK 并且已经创建了我的第一个下拉列表,然后选择单元格并将填充手柄拖到要应用此选项的单元格。

5。 然后,我可以创建第二个下拉列表,选择一个空白单元格,然后单击 时间 > 数据验证 > 数据验证 再次,在 数据验证 对话框,单击 个人设置 标签,选择 清单 来自 下拉列表,然后输入此公式 =间接(F1)来源 框,请参见屏幕截图:

备注: F1 表示我创建的第一个下拉列表的单元格位置,您可以根据需要进行更改。

6. 然后点击 确定, 并向下拖动单元格内容,则已成功创建从属下拉列表。 看截图:

然后,如果我选择一种食物,则相应的单元格将仅显示其特定的食物名称。

笔记:
1.仅当单元处于活动状态时,下拉箭头才可见。
2.您可以根据需要继续深入,如果要创建第三个下拉列表,只需将第二个下拉列表用作 来源 第三个下拉菜单中的

演示:在Excel中创建动态下拉列表


Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

使用一个神奇的工具快速创建依赖下拉列表

假设您在RangeB2:E8中有一个数据表,并且您想基于Range G2:H8中的数据表创建独立的下拉列表。 现在,您可以轻松地完成 动态下拉列表 的特点 Kutools for Excel.

Kutools for Excel-包括300多个用于Excel的便捷工具。 全功能30天免费试用,无需信用卡! 立即行动吧!

1。 点击 库工具 > 下拉列表 > 动态下拉列表 启用此功能。

2。 在弹出的对话框中,请执行以下操作:

(1)勾选 2级依赖下拉列表 选项;
(2)在“数据范围”框中,选择要创建独立下拉列表的数据表;
(3)在“输出范围”框中,请选择将放置独立下拉列表的目标范围。

3。 点击 Ok 按钮。

到目前为止,已经在指定的目标范围内创建了独立的下拉列表。 您可以轻松地从这些独立的下拉列表中选择选项。



相关文章:

最佳办公生产力工具

🤖 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 (27)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Why the dependent list doesn't change instantly?
This comment was minimized by the moderator on the site
Hi Ferat,
Have you followed the tutorial to create your dynamic drop down list? If followed the tutorial, the dependent list will change immediately as the main choice (in Cell F1) changes.
More detailed information can help me understand your problem. If possible, upload some screenshots will be helpful!
This comment was minimized by the moderator on the site
So I tried this with dynamic ranges. It's a no go. It does work with static ranges though.
This comment was minimized by the moderator on the site
I understand but how can I repeat the dropdown formatting in all rows of excel
This comment was minimized by the moderator on the site
Have you received an answer to your question? I'm wondering the same thing..
This comment was minimized by the moderator on the site
Lara, you are probably missed the second half of ste p 4. 4. Click OK and my first drop down list have been created, then select the cell and drag the fill handle to the cell that you want to apply this option.
This comment was minimized by the moderator on the site
I keep getting an error that says " the source currently evaluates to an error", any reason why? I followed the steps above. Any guidance would be greatly appreciated.
This comment was minimized by the moderator on the site
Hi, I am looking to do something similar but the only problem being my dynamic parameter and value combination list is structured as below Parm_nm Val_list Parent1 Item01 Parent1 Item02 Parent2 Item01 Parent2 Item03 Parent2 Item11 Parent3 Item32 Parent3 Item02 Parent4 Item09 Parent4 Item01 And I want to choose appropriate drop down depending on the header definition Eg: If the header definition is Parent3 then the drop down for the cells under the column should have Item32 and Item02. If the header is changed to Parent02 then the drop down list becomes Item01, Item3 and Item11. It is exactly what is being done here apart from the fact the source data structure is completely different and I do not have freedom to restructure it. In such a scenario I am not being able to Name the range of the second level list as I cannot just select and name them. Any help in this regard will highly appreciated. Regards, Sattam
This comment was minimized by the moderator on the site
in case the second drop down has to pick a list that is Dynamic, then how will this work. As in if fruit food meat and drink is for month one and the names for month two changes to fruit2 meat2 food2 and drink2 along with the selection below this headings then how do we use thius formula.
This comment was minimized by the moderator on the site
Thank you it worked like a magic
This comment was minimized by the moderator on the site
When I create a drop-down list using data validation, how can I select the valid entries from the keyboard, I want to type the number and have it auto-populate. Data Validation List looks like this : 1_Ready 2_On Hold 3_ Rejected
This comment was minimized by the moderator on the site
Quite useful. Thank you.
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