excel下拉菜单vba

To help users enter data in a spreadsheet, you can create drop down lists with Excel's Data Validation feature. For example, in an order form, you could provide drop down lists of customers, products, colours, sizes and shipping methods.

为了帮助用户在电子表格中输入数据,您可以使用Excel的“数据验证”功能创建下拉列表。 例如,在订单中,您可以提供客户,产品,颜色,尺寸和运输方式的下拉列表。

Usually, each of these lists would need a different Source in the Data Validation dialog box. The Customer list would have =CustList as its source, while the Product drop down would have =ProdList as its source.

通常,这些列表中的每个列表在“数据验证”对话框中都需要一个不同的“来源”。 客户列表将以= CustList作为其源,而产品下拉列表将以= ProdList作为其源。

使用相同的来源 (Use the Same Source)

Instead of using a different source for each data validation list, AlexJ has devised a simple way to use the same source for all the lists. This makes it much easier to create and maintain a set of drop down lists.

AlexJ没有为每个数据验证列表使用不同的来源,而是设计了一种简单的方法为所有列表使用相同的来源。 这使创建和维护一组下拉列表变得更加容易。

In AlexJ's sample file, he's recording farm information, with drop down lists for Fruit, Vegetable, Farm Equipment and Farmer. He's typed these lists in the workbook, and named them: DD.Fruit, DD.Veg, DD.Equip and noDD.

在AlexJ的样本文件中,他记录着农场信息,以及水果,蔬菜,农场设备和农夫的下拉列表。 他在工作簿中键入了这些列表,并将其命名为:DD.Fruit,DD.Veg,DD.Equip和noDD。

The noDD list is just a blank cell, and it can be used when you want users to be able to type freeform in a column.

noDD列表只是一个空白单元格,当您希望用户能够在列中键入自由格式时可以使用它。

In row 2, above the table where users will select from the drop down lists, AlexJ has typed the name of the source range for the column below.

在用户将要从下拉列表中选择的表上方的第2行中,AlexJ为以下列键入了源范围的名称。

Then, AlexJ selected all the blue cells, where drop down lists will be created. In the Data Validation dialog box, he selected Allow: List. As the Source, he entered: =INDIRECT(C$2)

然后,AlexJ选择了所有蓝色单元格,将在其中创建下拉列表。 在“数据验证”对话框中,他选择了“允许:列表”。 作为来源,他输入: = INDIRECT(C $ 2)

The column reference (C) is relative, and the row reference ($2) is absolute.

列引用(C)是相对的,行引用($ 2)是绝对的。

设定提示 (Setup Tips)

  • AlexJ hides row 2, using Outlining, so users aren't distracted by the range names.AlexJ使用大纲隐藏第2行,因此用户不会被范围名称所分散。
  • In the sample file, the named ranges are on the same sheet as the data entry range. In his actual files, AlexJ would have these on another sheet, hidden from users.在示例文件中,命名范围与数据输入范围在同一页上。 在他的实际文件中,AlexJ将这些文件放在另一张纸上,对用户隐藏。
  • Instead of selecting noDD, cell F2 could be left blank, so no dropdown list would appear.代替选择noDD,单元格F2可以留为空白,因此不会出现下拉列表。
  • No Error Alerts or Input Messages are used in the sample file, but you could add these to your application, if needed.示例文件中没有使用错误警报或输入消息,但是可以根据需要将它们添加到应用程序中。
  • The drop down range names in cells J6:M6 are in a range named DD.Ranges. That range is used to create the drop down lists in row 2.单元格J6:M6中的下拉范围名称在一个名为DD.Ranges的范围内。 该范围用于在第2行中创建下拉列表。

下载样本文件 (Download the Sample File)

To download AlexJ's sample file click here: Universal Data Validation Drop Downs (zipped 25 KB)

要下载AlexJ的样本文件,请单击此处: 通用数据验证下拉列表 (压缩25 KB)

你怎么看? (What Do You Think?)

I frequently use the INDIRECT function to create dependent data validation lists. However, I hadn't seen this idea used before, to create different drop down lists from the same source formula. To me, it seems like a great way to create several adjacent lists, and makes it easy to maintain them.

我经常使用INDIRECT函数来创建相关的数据验证列表 。 但是,我以前从未见过使用同一想法从同一源公式创建不同的下拉列表的想法。 对我而言,这似乎是创建多个相邻列表并使其易于维护的好方法。

AlexJ would appreciate your feedback. What do you think? Would you use this technique? Anything you'd add or change? _________________________

AlexJ非常感谢您的反馈。 你怎么看? 您会使用这种技术吗? 您要添加或更改的内容吗? _________________________

翻译自: https://contexturesblog.com/archives/2009/02/18/different-excel-drop-downs-from-one-source/

excel下拉菜单vba


http://www.taodudu.cc/news/show-4377584.html

相关文章:

  • 移动 App 接入 QQ 登录/分享流程
  • Android Studio仿QQ界面实现简单的功能
  • 【编程开发】之微信登录
  • Python开发qq批量登陆
  • Android QQ 登录接入详细介绍
  • STM32F407定时器输入捕获
  • DSP芯片倍频太大导致low power mode,无法连接JTAG
  • 【附源码】计算机毕业设计Python安卓“我爱厨房”APP5loq7(源码+程序+LW+调试部署)
  • relay_log_purge参数一则
  • 做相关性分析时,如何排除奇异值Outliers,以增加相关分析的准确性
  • velocity源码分析:初始化之日志系统
  • Linux 登录MySQL出现 unknown variable...错误
  • [ERROR] Slave SQL for channel ‘‘: Could not execute Write_rows event on table xxx.xxx; Duplicate ent
  • 导入数据库显示服务器发生意外,mysql 数据库无法启动(Ignoring the redo log due to missing M...
  • 16k a4_16开纸是多大(185mmx260mm),相当于1张A4纸大小
  • 2023上海国际民宿展与您相约7月5-7日,共启民宿升华之旅!
  • 面试时如何反问面试官
  • javax.net.ssl.SSLHandshakeException: No appropriate protocol
  • javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher su 解决办法
  • 层次Voronoi Diagrams更好地为HNSW的最底层获取入口点优化近似最近邻搜索(HVS)
  • mysql多对一[自用]
  • ELK集群部署(六)之Kafka操作
  • 报错:Module parse failed: ‘return‘ outside of function (4:1) You may need an appropriate loader
  • 无法连接到mysql数据库_无法连接到数据库服务器(mysql workbench)
  • cv2.cv2.findContours opencv-python
  • AppRTC 实践
  • (Android-RTC-1)Android-WebRTC初体验
  • 42、生鲜电商平台-商品的spu和sku数据结构设计与架构
  • 数据分析基础——数据规整
  • Linux内存管理(三十五):内存规整简介和 kcompactd详解

excel下拉菜单vba_一站式提供不同的Excel下拉菜单相关推荐

  1. excel下拉菜单vba_在Excel下拉菜单中删除使用过的项目

    excel下拉菜单vba There is a new sample file on my Contextures web site, which lets you pick players for ...

  2. excel图表配合下拉菜单_在下拉列表中选择Excel仪表盘图表

    excel图表配合下拉菜单 You can make an interactive dashboard in Excel, even if you can't use macros, or prefe ...

  3. 单元格只能下拉框选_excel给单元格添加下拉菜单列表无需按键盘用鼠标选择即可...

    excel给单元格添加下拉菜单列表无需按键盘用鼠标选择即可 时间:2013-12-08   作者:snow   来源:互联网 为了方便快速的输入数据,通常情况下我们会给单元格添加一个下拉菜单,如此一来 ...

  4. ajax里绑定框,Select级联菜单,用Ajax获取Json绑定下拉框(jQuery)

    需求类似这样  ↓ ↓ ↓   --> 菜单A发生变化,动态取数据填充下拉菜单B. JS代码如下: $(function () { $("#TeamSelect").chan ...

  5. python三级联动菜单_Excel–这才是三级联动下拉菜单的正确做法

    Excel–这才是三级联动下拉菜单的正确做法,跟二级联动菜单完全不同! 文章来源:企鹅号 - Excel学习世界 今天教大家制作三级联动下拉菜单. 很多同学以为三级联动下拉做法跟二级联动下拉菜单是一样 ...

  6. python tkinter 下拉框_python中tkinter入门之Menu创建顶级菜单、下拉菜单和弹出菜单。...

    创建顶级菜单 Menu 组件通常被用于实现应用程序上的各种菜单.使用add_command可以添加菜单内容.创建后通过root.config()添加到窗口上. from tkinter import ...

  7. bootstrap下拉框分页_【Bootstrap】 bootstrap-select2下拉菜单插件

    这次开发了个小TRS系统,虽然是很小,但是作为初心者,第一次用到了很多看起来洋气使用起来有相对简单的各种前端(主要是和bootstrap配合使用)组件.包括bootstrap-select2,boot ...

  8. 开发一个出生年份的下拉选择框供用户选择_关于下拉式菜单,这一篇足够了

    下拉菜单主要有两种类型: 1.用于导航的下拉菜单: 2.用于表单的下拉菜单. 在本文中,我们将对以下内容进行介绍: 01 结构剖析 下拉菜单的解剖结构与文本输入字段的解剖结构非常相似. 02 下拉菜单 ...

  9. 删除下拉框只找23火星软件_下拉框优化首选23火星软件

    会员注册发帖 成功不是为了让周围的人都羡慕你,称赞你,而是让周围的人都需要你,离不开你,因害怕失败而不敢放手一搏,永远不会成功.动手成功,伸手落空.光说不干,事事落空:又说又干,马到成功大胆的尝试只等 ...

最新文章

  1. JavaScript中十种一步拷贝数组的方法
  2. JSON对象和JSON 字符串之间的相互转换
  3. stm32系统滴答定时器使用
  4. fastjson转换包含date类型属性的对象时报错com.alibaba.fastjson.JSONException: For input string 解决方法
  5. 用__postback传递JavaScript变量到c#(pass a js variable to C# by a __postback )
  6. linux修改jdk文件保存,Linux下更换jdk和配置环境变量详解
  7. 编程笔记:python 中的 OrderedDict
  8. Laravel报错:Whoops, looks like something went wrong.
  9. 数学三次危机(四)第一次数学危机
  10. opencv颜色识别学习总结
  11. 更新显卡驱动后黑屏无法进入系统的解决办法
  12. 【转】初入NLP领域的一些小建议
  13. 普通话水平测试软件怎么样,求测试普通话标准的软件?6款普通话软件推荐
  14. 12月英语计算机统考时间,网络教育2019年12月统考时间与统考科目
  15. Git如何删除本地仓库
  16. 汽车CAN总线系统原理与应用
  17. 始终玩小游戏,我就是一个无聊之人
  18. 移动互联网的发展现状
  19. sap定价设计条件技术
  20. 除非Microsoft FTP 服务(FTPSVC)正在运行,否则无法启动FTP站点。服务目前已停止。

热门文章

  1. ubuntu 登录界面卡死解决方法
  2. yyyy/mm/dd变成yyyy-mm-dd
  3. php版本kms,通过 AWS KMS API 和 AWS SDK for PHP 版本 3 使用别名 - 适用于 PHP 的 AWS 开发工具包...
  4. Linux交换分区swap
  5. python将两张图片拼接成一张图_Python将两张图片拼接到一起 - 小众知识
  6. fiddler CSFF安全漏洞-重点讲解refer字段、token字段
  7. 我蛮喜欢的几首 五月天 的励志歌曲
  8. python打包flask项目exe
  9. 在C和C ++中创建循环缓冲区
  10. 攻防世界we区newer题目