跳到主要内容

如何在另一个工作表或工作簿中创建外部数据验证?

通常,我们使用数据验证来限制用户输入所需的值,但是您是否曾经尝试过在其他工作表或工作簿中创建外部数据验证,这意味着源数据和数据验证不在同一工作表中或甚至是同一本工作簿? 在本文中,我将介绍在Excel中处理此问题的方法。

在另一个工作表中创建外部数据验证

在其他工作簿中创建外部数据验证


箭头蓝色右气泡 在另一个工作表中创建外部数据验证

以创建下拉列表为例,我将在一个工作表中创建源,然后使用Range Name根据值源在另一个工作表中创建下拉列表。

1.根据需要在工作表中创建下拉列表的源值。 看截图:
doc外部数据验证1

2.选择这些源值,然后转到 名称框 为单元格定义一个范围名称,在这里我输入 国家 ,在 名称框,然后按 输入 完成命名的关键。 看截图:
doc外部数据验证2

3.转到要创建此外部下拉列表的工作表,然后选择一个单元格或范围以放置下拉列表,例如G1:G4,然后单击 时间 > 数据验证。 看截图:
doc外部数据验证3

4.在 数据验证 对话框中,单击 个人设置 选项卡,然后选择 清单 来自 下拉列表,然后输入 =国家 (国家/地区是您在第2步中为来源范围定义的名称,您可以根据需要更改)。 来源。 看截图:
doc外部数据验证4

5。 点击 OK,现在已创建外部数据验证。
doc外部数据验证5


箭头蓝色右气泡 在其他工作簿中创建外部数据验证

若要在另一个工作簿中创建外部数据验证,您还需要使用“名称范围”。

以创建下拉列表为例。

1.在工作表中根据需要创建源值,然后选择源值,然后转到 名称框 为来源范围命名,然后按 输入 钥匙,拿 名称 例如。 看截图:
doc外部数据验证6

2.然后转到您要创建的工作簿下拉列表,在工作表中选择一个空白列,例如J列,然后单击 公式 > 定义名称。 看截图:
doc外部数据验证7

3.在 新名字 对话框中,在 名字 框,然后选择 工作簿 来自 范围 列表,然后键入此公式 = Source.xlsx!CustName (“源”是源数据所在的工作簿的工作簿名称,“ CustName”是您在步骤1中为源数据创建的范围名称,您可以根据需要更改它们)。 文本框。 看截图:
doc外部数据验证8

4。 点击 OK。 然后选择要创建外部下拉列表的范围L1:L4,然后单击 时间 > 数据验证。 看截图:
doc外部数据验证9

5.在 数据验证 对话框中,单击 个人设置 选项卡,然后选择 清单 下拉列表,然后输入此公式 =我的客户清单 (MyCustList是您在步骤3中为空白列提供的范围名称,您可以根据需要进行更改)到 来源 框。 看截图:
doc外部数据验证10

6。 点击 OK。 现在,已在另一个工作簿中创建了外部数据验证。 看截图:
doc外部数据验证11

备注:仅当两个工作簿(源数据工作簿和数据验证工作簿)同时打开时,外部数据验证才能正确工作。

最佳办公生产力工具

🤖 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 (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
"Only when the two workbook are open at the same time (the source data workbook and the data validation workbook), the external data validation can correctly work." Yes this is rather a big problem isn't it? We would not usually have two workbooks open at the same time, we more likely wish to use an old workbook and simply copy the data validation rules to the new spreadsheet. I gave up trying to do this using copy and paste, instead wrote a VBA macro which applied the data validation rule to a large number of cells in one go. Use 'Record Macro' to set up the VBA commands and make minor adjustments to the resulting code to do the trick. Worked fine.
This comment was minimized by the moderator on the site
Glad its not just me that can't get the external data validation to work. Frustratingly it seemed to once but never again. No idea what I did that time.
This comment was minimized by the moderator on the site
Hello, thanks for showing us how to have a drop-down list linked to an external file. However I could not set up the Data Validation to work, even though I have selected to STOP any invalid entry, which a number not included in the drop-down list itself. Is there any way where I can circumnavigate this?
This comment was minimized by the moderator on the site
Create external data validation in different workbook. This tips not working for sharing file one PC to another PC. How it will works? pls. suggest me.
This comment was minimized by the moderator on the site
Sorry I have no idea on this.
This comment was minimized by the moderator on the site
Thank you so much for this article! I could not get Excel to allow me to reference another sheet for a data validation list. I can only surmise that it is because of the version. Very frustrating! However, I did not know about naming the data list, and by doing so and using the =[data list name], it worked like a charm. Many thanks!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations