excel 表做下拉框
Would you prefer a bigger font size for items in a data validation drop down list? Would you save typing time if the words were completed automatically, as you started typing them?
您是否希望数据验证下拉列表中的项目使用更大的字体大小? 如果单词在开始键入时自动完成,您会节省键入时间吗?
Not all your dreams can come true in Excel, but this tip might fulfill a few of them. Instead of using data validation, you can use a combo box on an Excel worksheet to show a drop down list.
并非所有梦想都能在Excel中实现,但是此技巧可能会实现其中的一些梦想。 可以使用Excel工作表上的组合框来显示下拉列表,而不是使用数据验证。
At the left, in the screen shot below, is a combo box, and you can compare it to the data validation drop down list on the right.
在下面的屏幕截图中,左侧是一个组合框,您可以将其与右侧的数据验证下拉列表进行比较。
组合框功能 (Combo Box Features)
Unlike data validation, the combo box can be formatted and fine tuned. For example, in a combo box, you can:
与数据验证不同,可以对组合框进行格式化和微调。 例如,在组合框中,您可以:
- change the font size 更改字体大小
- increase the number of visible rows in the list 增加列表中可见行的数量
- use the AutoComplete feature to make data entry easier 使用自动完成功能使数据输入更加容易
- always see the drop down arrow 总是看到下拉箭头
建立清单 (Create a List)
In this example, there is a named range -- MonthList -- with a list of the 12 month names. There are instructions on my Contextures website, for naming a range of cells.
在此示例中,有一个命名范围-MonthList-包含12个月名称的列表。 我的Contextures网站上有关于命名一系列单元格的说明 。
This named range is used in the data validation list, and we will also use it as the source for the combo box.
此命名范围用于数据验证列表中,我们还将其用作组合框的源。
将组合框添加到工作表 (Add a Combo Box to the Worksheet)
To add a combo box on an Excel sheet, follow these steps:
要在Excel工作表上添加一个组合框,请按照下列步骤操作:
On the Excel Ribbon, click the Developer tab (If you don't see a Developer tab, click here for instructions on how to add it)
在Excel功能区上,单击“开发人员”选项卡(如果没有看到“开发人员”选项卡, 请单击此处以获取有关如何添加它的说明)
- In the Controls group, click Insert, then click the Combo Box in the ActiveX Controls section 在控件组中,单击插入,然后单击“ ActiveX控件”部分中的组合框
- Click on the worksheet, to create a default sized combo box (or drag with the pointer, to create a combo box in the size that you need) 单击工作表,以创建一个默认大小的组合框(或使用指针拖动,以创建所需大小的组合框)
设置组合框属性 (Set the Combo Box Properties)
After you create the combo box, follow these steps to change its properties:
创建组合框后,请按照下列步骤更改其属性:
- Right-click on the combo box, and click Properties 用鼠标右键单击组合框,然后单击属性
- To change the Font size, click the ... button at the right of the Font property 要更改字体大小,请单击Font属性右侧的...按钮。
- To add items to the combo box drop down list, type a range name or range reference in the List Fill box. In this example, we use the named range, MonthList. You could use an address instead, such as B2:B13 要将项目添加到组合框下拉列表,请在“列表填充”框中键入范围名称或范围引用。 在此示例中,我们使用命名范围MonthList。 您可以改用地址,例如B2:B13
To change the number of visible rows in the drop down, increase or decrease the number in the ListRows property box.
要更改下拉列表中的可见行数,请在ListRows属性框中增加或减少数目。
For a list of 12 months, we could change the setting to 12, so all the months can be seen, without scrolling through the list.
对于12个月的列表,我们可以将设置更改为12,这样就可以看到所有月份,而无需滚动列表。
激活组合框 (Activate the Combo Box)
After you've made the changes to the combo box properties:
对组合框属性进行更改后:
- Click the Design Mode command on the Excel Ribbon's Developer tab, to exit Design Mode. 单击Excel功能区的“开发人员”选项卡上的“设计模式”命令,以退出“设计模式”。
- Click the drop down arrow on the combo box, to see the list, and click an item to select it. 单击组合框上的下拉箭头以查看列表,然后单击一个项目以将其选中。
将组合框与数据验证一起使用 (Use a Combo Box With Data Validation)
You can also use a combo box to supplement a data validation list, as described on the Excel Data Validation Combo Box page on the Contextures website.
您还可以使用组合框补充数据验证列表,如Contextures网站上的“ Excel数据验证组合框”页面所述。
In that example, there's one hidden combo box on the worksheet, and it appears if you double-click a data validation cell.
在该示例中,工作表上有一个隐藏的组合框,如果您双击数据验证单元格,它就会出现。
观看Excel组合框视频 (Watch the Excel Combo Box Video)
To see the steps for creating an Excel combo box with a drop down list, and changing its formatting, watch this short excel video tutorial.
要查看创建带有下拉列表的Excel组合框以及更改其格式的步骤,请观看此简短的excel视频教程。
翻译自: https://contexturesblog.com/archives/2010/11/10/combo-box-drop-down-for-excel-worksheet/
excel 表做下拉框
本文介绍了如何在Excel工作表上使用组合框替代数据验证创建下拉列表,提供更好的格式化和用户体验。你可以更改字体大小、增加可见行数并利用自动完成功能。文章详细阐述了创建、格式化组合框以及与数据验证结合使用的步骤,并提供了相关视频教程链接。


被折叠的 条评论
为什么被折叠?



