[英]Lookup multiple values on multiple criteria in excel
I am working in excel 2013. I have a table called data. 我正在Excel 2013中工作。我有一个名为data的表。
color letter number
red a 1
red b 2
blue a 1
blue a 1
blue b 1
blue a 2
blue a 2
I want to look up [number] for all rows where [color]=blue and [letter]=a, so the rows I highlighted above. 我想为[color] = blue和[letter] = a的所有行查找[number],因此我在上面突出显示了这些行。
=IFERROR(INDEX(data[number],AGGREGATE(15,6,ROW(data[#All])/((data[color]="blue")*(data[letter]="a")), ROW(1:1))), "")
This code gives me all [number] that are "blue" and "a", and currently returns 此代码为我提供了所有“蓝色”和“ a”的[数字],并且当前返回
number
1
1
2
2
How do I get it to return this instead: 我如何获取它以返回此值:
table
1
2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.