excel能设置从属值集吗_Excel中的从属组合框

excel能设置从属值集吗

You can add a drop down list in a worksheet cell, so people can select from a list of valid entries. The font in that list is pretty small though, even if the worksheet is at 100% zoom. And good luck trying to read it, if you go to a lower zoom setting! My eyes aren’t that good, so I use a pop-up combo box, in some workbooks, to make the list easier to use.

您可以在工作表单元格中添加一个下拉列表 ,以便人们可以从有效条目列表中进行选择。 即使工作表以100%缩放,该列表中的字体也很小。 如果您使用较低的变焦设置,请尝试阅读它,祝您好运! 我的视线不好,因此在某些工作簿使用了一个弹出式组合框 ,以使列表更易于使用。

组合框优点 (Combo Box Advantages)

On the worksheet, there’s only one combo box, and it pops up when you click or double-click a cell that has a data validation drop down list.

在工作表上,只有一个组合框,当您单击或双击具有数据验证下拉列表的单元格时,它将弹出。

There are a few benefits to using combo boxes:

使用组合框有一些好处:

  • You can change the font size, so the text is big enough to read

    您可以更改字体大小,因此文本足够大,可以阅读
  • You can change the number of visible items, to reduce the amount of scrolling that’s needed

    您可以更改可见项的数量,以减少所需的滚动量
  • When you start typing, the matching item is filled in (autocomplete)

    当您开始输入内容时,将填写匹配项(自动填充)

组合框的缺点 (Combo Box Disadvantages)

Of course, there are some disadvantages too, so keep those in mind if you decide to use a combo box popup

当然,也有一些缺点,因此,如果您决定使用组合框弹出窗口,请记住这些缺点

  • This technique uses programming, and wipes out Excel’s Undo list, like most macros do

    这项技术使用编程功能,像大多数宏一样清除Excel的“撤消”列表
  • The single-click option for the code runs every time you select a different cell on the worksheet, so that could slow down a large workbook

    每当您在工作表上选择一个不同的单元格时,代码的单击选项便会运行,因此这可能会减慢大型工作簿的运行速度
  • The combo boxes are ActiveX controls, so they won’t work in Excel for the Mac

    组合框是ActiveX控件,因此它们在Mac的Excel中不起作用

依赖组合框 (Dependent Combo Boxes)

The previous sample files that I’ve uploaded were designed to work with a simple list of items on the same sheet, or a list in a named range on any sheet. They didn’t work with a dependent list though, such as a list of cities based on the region selected in a different cell.

我上载的先前样本文件旨在与同一工作表上的项目的简单列表一起使用,或与任何工作表中的命名范围内的列表一起使用。 但是,它们无法使用从属列表 ,例如基于在不同单元格中选择的区域的城市列表。

In the screen shot below, column C has data validation that uses a simple INDIRECT formula, =INDIRECT(B3),

在下面的屏幕快照中,列C具有使用简单的INDIRECT公式 = INDIRECT(B3)的数据验证,

If you tried the combo box with that type of data validation list, it just showed an empty list. So sad!

如果您尝试使用该类型的数据验证列表的组合框,它只会显示一个空列表。 好难过!

新的和改进的从属组合框 (New and Improved Dependent Combo Box)

To prevent the heartbreak of empty combo box lists, I finally uploaded a new combo box sample file. It doesn’t handle fancy formulas, but at least is shows a drop down list if a cell has a simple INDIRECT formula.

为了防止空的组合框列表令人心碎,我终于上传了一个新的组合框示例文件。 它不处理花哨的公式,但如果单元格具有简单的INDIRECT公式,则至少会显示一个下拉列表。

下载从属组合框文件 (Download the Dependent Combo Box File)

You can learn more about the Dependent Combo Box on my website, and download the sample file.

您可以在我的网站上了解有关“依赖组合框”的更多信息 ,并下载示例文件。

数据输入弹出套件 (Data Entry Popup Kit)

If you have drop down lists with complex dependent drop down lists, there is a premium version of this technique, and you can see the details here: Data Validation Multi Select Premium. It runs on a protected worksheet, and works with most types of dependent drop down lists.

如果您具有包含复杂的从属下拉列表的下拉列表,则有此技术的高级版本,您可以在此处查看详细信息: Data Validation Multi Select Premium 。 它在受保护的工作表上运行,并且可以与大多数类型的依存下拉列表一起使用。

In the premium version, a list box automatically appears when you select a cell that has a drop down list. You can set it to allow selection of a single item, or multiple items. The kit has a setup sheet, that lets you quickly customize the list box, and simple steps to add this technique to your own workbooks.

在高级版本中,当您选择具有下拉列表的单元格时,将自动出现一个列表框。 您可以将其设置为允许选择一个或多个项目。 该工具包有一个设置表,可让您快速自定义列表框,并提供简单的步骤将此技术添加到您自己的工作簿中。

翻译自: https://contexturesblog.com/archives/2016/09/22/dependent-combo-box-in-excel/

excel能设置从属值集吗

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值