简体   繁体   English

INDEX / MATCH多个条件

[英]INDEX/MATCH multiple criteria

I am making up a tab with data ordered vertical, and need to index and match with another tab where the data is ordered horizontal. 我正在制作一个数据按垂直顺序排列的标签,并且需要对另一个数据按水平排列的标签进行索引和匹配。

I have tried to do a tutorial on this, and it seemed do-able. 我试图为此做一个教程,而且似乎可行。 I made an array formula which I think captures all criteria to get the right value, but it gives me #N/A. 我做了一个数组公式,我认为它可以捕获所有条件以获得正确的值,但是它给了我#N/A.

I figured I'd use the following three criteria: 我认为我会使用以下三个条件:

  • Row name (in this case "XXX") 行名(在本例中为“ XXX”)
  • Family name (in this case "Amphipoda") 姓氏(在这种情况下为“两栖动物”)
  • "Count", as that's the exact row I want to get a result from. “计数”,因为这是我要从中获取结果的确切行。

The formula is: 公式为:

{=INDEX(Family_Distribution!A1:Z271,MATCH(1,(Family_Distribution!C1:X1=all_Results_Habitats!A38)*(Family_Distribution!A1:A271=all_Results_Habitats!B1)*(Family_Distribution!B:B="Count"),0),3)}

The table to perform the indexing and matching with looks like this: 执行索引和匹配的表如下所示:

要索引并匹配的表

The table where I place the formula looks like this: 我放置公式的表如下所示:

放置公式的表格

What am I doing wrong? 我究竟做错了什么?

试试看,不需要数组条目:

=INDEX(Family_Distribution!$C$2:$Z$271,MATCH(1,INDEX((Family_Distribution!$A$2:$A$271=all_Results_Habitats!B1)*(Family_Distribution!$B$2:$B$271="Count"),),0),MATCH(all_Results_Habitats!A38,Family_Distribution!$C$1:$Z$1,0))

我不会重新输入所有内容进行测试,因此未经测试:

=SUMIFS(INDEX(Family_Distribution!A:Z,MATCH($B$1,Family_Distribution!A:A,0)+MATCH("Count",Family_Distribution!B:B,0)-1,0),INDEX(Family_Distribution!A:Z,MATCH($B$1,Family_Distribution!A:A,0),0),B38)

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

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