简体   繁体   English

从属下拉列表Excel-唯一值

[英]Dependent Drop Down List Excel - Unique Values

I need to connect three lists of data and put them into drop down lists. 我需要连接三个数据列表并将其放入下拉列表。 So I started by making named ranges, getting all of the unique values and such. 因此,我首先创建命名范围,获取所有唯一值等。

Essentially I followed the instructions on this website: http://www.get-digital-help.com/2010/07/17/create-dependent-drop-down-lists-containing-unique-distinct-values-in-excel/ 基本上,我遵循了此网站上的说明: http : //www.get-digital-help.com/2010/07/17/create-dependent-drop-down-lists- contains-unique-distinct-values-in- excel /

After following the website, I placed these three drop downs all in the same row, one cell apart. 在浏览完网站之后,我将这三个下拉列表全部放在同一行中,相隔一个单元格。 HOWEVER, now I need to have the same three drop down sequence in the next row down. 但是,现在我需要在下一行中具有相同的三个下拉序列。 When I try to do this, the second row is dependent on the values of the first one. 当我尝试执行此操作时,第二行取决于第一行的值。 So if I pick an initial value for the first row that is not the same initial value as the second row it will not work correctly. 因此,如果我为第一行选择的初始值与第二行的初始值不同,则它将无法正常工作。

Does anyone see a way around this? 有谁看到解决方法?

Thanks! 谢谢!

As it is, you are creating a unique list for the first drop down box in the first row. 实际上,您正在为第一行的第一个下拉框创建唯一列表。 The unique list for the second drop down in the first row is dependent upon the value present in your first drop down on the first row. 第一行中第二个下拉列表的唯一列表取决于第一行中第一个下拉列表中的值。 The second list looks for the value you selected in the first drop down of the first row and populates itself with the corresponding values for every instance of the value you picked from the first drop down. 第二个列表查找在第一行的第一个下拉列表中选择的值,并为从第一个下拉列表中选取的值的每个实例填充相应的值。 This list repopulates and changes every time you select a new value in the first drop down of the first row. 每当您在第一行的第一个下拉列表中选择一个新值时,此列表就会重新填充并更改。

When you are creating the second row, the second drop down is reading from the first row's unique list. 创建第二行时,第二个下拉列表是从第一行的唯一列表中读取的。 There is no unique list based upon the value you have selected in the first drop down of the second row for the second drop down of your second row. 根据您在第二行的第一下拉列表中为第二行的第二下拉列表中选择的值,没有唯一列表。

The workaround is to create new lists for the drop downs in the second row. 解决方法是为第二行的下拉列表创建新列表。

From your link: 从您的链接:

 3.Type "=INDEX(product, MATCH(0, COUNTIF($B$1:B1, product)+(order<>Sheet1!**$D$2**), 0))" 

The bolded part is your problem. 粗体部分是您的问题。 When you drag this formula, it ties everything to D2 on Sheet1. 当您拖动此公式时,它将所有内容绑定到Sheet1上的D2。 You will need to make another list using this formula, but change $D$2 to $D$3 or whatever the cell address of your first drop down is for that row. 您将需要使用此公式创建另一个列表,但是将$ D $ 2更改为$ D $ 3或第一个下拉列表的单元格地址用于该行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM