简体   繁体   English

Excel:索引/匹配以返回数组

[英]Excel: Index/match to return array

Sheet1 & Sheet 2 Sheet1&Sheet 2
表1表2

I am looking for a way that can perform the following task in excel for each of the column A values: 我正在寻找一种方法,可以针对每个A列值在excel中执行以下任务:

  • Match value A2 of sheet 1 to the right value in array A2:C2 from Sheet2 and return the respective array beneath the matching column (in this case A3:A4 from Sheet2). 匹配值A2片1在阵列权值的A2:C2从Sheet 2中,并返回匹配柱下方的相应阵列(在本例A3:A4从Sheet 2中)。
  • This array would then need to be used for a COUNTIF function for finding value B2 within this returning array. 然后需要将此数组用于COUNTIF函数,以便在此返回数组中查找值B2

Sheet1 (Results) Sheet1(结果)
表1结果

在sheet1!c2中尝试一下并填写,

=COUNTIF(INDEX(Sheet2!A:C, 0, MATCH(A2, Sheet2!$2:$2, 0)), B2)

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

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