excel整列动态联动下拉_在Excel下拉列表中显示多列

本文介绍了如何在Excel中创建动态联动的下拉列表,以显示多列数据,包括使用数据验证列表的限制和如何改用组合框来实现多列显示。提供了添加单个组合框的方法,并解释了如何通过INDEX公式获取选定组合框项的相关详情。同时,讨论了使用多个组合框可能带来的问题,并提供了一个带有隐藏组合框的示例文件下载链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

excel整列动态联动下拉

A data validation drop down list in Excel only shows one column of items. See how to show multiple columns in Excel drop down list -- we'll use something different from an ordinary in-cell drop down.

Excel中的数据验证下拉列表仅显示一列项目。 了解如何在Excel下拉列表中显示多列-我们将使用与普通单元内下拉列表不同的方式。

显示下拉列表 (Show a Drop Down List)

You can make data entry easier by adding drop down lists on a worksheet.  You can do this with a data validation list, but it has limitations.

通过在工作表上添加下拉列表,可以使数据输入更加容易。 您可以使用数据验证列表执行此操作,但是它有局限性。

For example, here are a few restrictions on in-cell drop down lists,

例如,以下是对单元内下拉列表的一些限制,

  • can’t change the font size

    无法更改字体大小
  • single column only

    仅单列
  • no autocomplete

    没有自动完成
comboboxaddress03

改用组合框 (Use a Combo Box Instead)

A combo box also lets you select from a drop down list, and you can change the font size, use autocomplete, and show multiple columns.

组合框还允许您从下拉列表中进行选择,并且可以更改字体大小,使用自动完成功能并显示多列。

comboboxaddress01

添加一个组合框 (Add a Single Combo Box)

For worksheets where you only need one or two drop downs, just add the combo box on the worksheet, and set its properties.

对于只需要一个或两个下拉菜单的工作表,只需在工作表上添加组合框,然后设置其属性即可。

In the example shown above, the combo box is used to select a customer name, and there can be multiple locations for each customer. The list has 6 columns. The first column, ShipID, is hidden, and it shows the next 5 columns, so you can see the customer’s address information, to make sure that you’re picking the right one.

在上面显示的示例中,组合框用于选择客户名称,每个客户可以有多个位置。 该列表有6列。 第一列ShipID是隐藏的,它显示接下来的5列,因此您可以查看客户的地址信息,以确保您选择的是正确的。

Then, in the cells below, INDEX formulas pull the related details for the selected customer location.

然后,在下面的单元格中, INDEX公式将为选定的客户位置拉相关的详细信息。

comboboxaddress02

使用多个组合框 (Use Multiple Combo Boxes)

Too many combo boxes can cause problems in an Excel file, so it’s best to limit the number that you add.

组合框过多会导致Excel文件出现问题,因此最好限制添加的数量。

If you need lots of drop downs on the worksheet, you can use my sample that has a hidden combo box. It pops up when you click, or double-click, on a data validation cell. This technique uses programming, but there is only one combo box, so it doesn’t add much to the file size.

如果您需要在工作表上进行大量下拉菜单,可以使用带有隐藏组合框的示例 。 当您单击或双击数据验证单元时,它将弹出。 该技术使用编程,但是只有一个组合框,因此不会增加文件大小。

datavalcombosheet04

下载地址组合框文件 (Download the Address Combo Box File)

To see how the customer location combo box works, download the sample file from my website. On the Sample Files page, go to the Functions section, and download the file FN0004 - ComboBox Selection.

若要查看客户位置组合框的工作方式,请从我的网站下载示例文件。 在“样本文件”页面上,转到“功能”部分,然后下载文件FN0004-ComboBox Selection

The zipped file is in xlsm format, and contains macros that update the ListFillRange. ___________________________

压缩文件为xlsm格式,并包含用于更新ListFillRange的宏。 ___________________________

翻译自: https://contexturesblog.com/archives/2013/07/30/show-multiple-columns-in-excel-drop-down-list/

excel整列动态联动下拉

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值