excel下拉复选多选_Excel下拉多选更新

excel下拉复选多选

I've done another update to the Data Validation Multiple Selection sample, thanks to a question from Pat, in a blog comment. He has 3 columns with different drop down lists, and wants to add new items to the applicable lists.

多亏了Pat的提问,我对Data Validation Multiple Selection示例进行了另一个更新。 他有3列带有不同的下拉列表,并希望将新项目添加到适用的列表。

I can get 3 separate columns to each allow multiple selects from their own lists and to allow write in contents...But what I want ...is to make the selected columns (not all) so that write in selections are written to the lists and the lists are sorted.

我可以得到3个单独的列,每个列允许从自己的列表中进行多个选择并允许写入内容...但是我想要的...是使选定的列(不是全部),以便将写入的选择写入到列表和列表进行排序。

So, in the new example, on the SameCellAddSort worksheet in the sample workbook, that's what happens. You can do a multiple select in columns C and D, but only a single selection in column B.

因此,在新示例中,在示例工作簿的SameCellAddSort工作表上,就是这样。 您可以在C和D列中进行多次选择,但在B列中只能进行一次选择。

datavalmulticelladdsort01

新增项目 (Add New Items)

New items can be added to the Names and Numbers columns. If a new name is entered in column C, is will be added to the NameList range on the Lists sheet. Then, the list is sorted alphabetically.

可以将新项目添加到“名称和编号”列。 如果在C列中输入了新名称,它将被添加到“列表”表上的“名称列表”范围。 然后,列表按字母顺序排序。

datavalmulticelladdsort02

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

To see the code, you can go to the Excel Data Validation - Select Multiple Items page on my Contextures site. The file contains macros, so enable them when opening the workbook.

要查看代码,可以转到Contextures网站上的“ Excel数据验证-选择多个项目”页面。 该文件包含宏,因此在打开工作簿时启用它们。

观看多项选择添加排序视频 (Watch the Multiple Selection Add Sort Video)

To see how the multiple selection add and sort technique works, and see an explanation of the code, you can watch this Excel video tutorial.

要了解多选添加和排序技术的工作原理,并查看代码说明,您可以观看此Excel视频教程。

演示地址

有关数据验证多项选择的更多信息 (More Information on Data Validation Multiple Selection)

Most of the examples in the DataValMultiSelect file have limits set in the code. For example, the code might check the column number, and only allow the multiple selections if the column number is 3.

DataValMultiSelect文件中的大多数示例都在代码中设置了限制。 例如,该代码可能会检查列号,并且仅在列号为3时才允许多项选择。

If you remove those checks from the code, and just check for data validation in the selected cell, you could have several multi-selection lists on the same worksheet. There is an explanation on my Contextures website, for adjusting the code:

如果您从代码中删除这些检查,而仅检查所选单元格中的数据验证,则同一工作表上可能会有多个选择列表。 我的Contextures网站上有一个解释,用于调整代码:

Here are a few more article on the data validation multiple selection technique:

这是有关数据验证多项选择技术的更多文章:

翻译自: https://contexturesblog.com/archives/2011/07/08/excel-drop-down-multi-select-update/

excel下拉复选多选

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值