简体   繁体   中英

Index match excel multiple criteria

Current test

=IFERROR(INDEX('[Soc Master List 19-20.xlsx]fullList'!$B$2:$B$20000,MATCH(Sheet2!A2,('[Soc Master List 19-20.xlsx]fullList'!$U$2:$U$20000)*('[Soc Master List 19-20.xlsx]fullList'!N:N="Yes"))),"")

Explanation of what I want:

Bring through as the value from sheet fullList row B in external doc

with lookup value on sheet2@A2

To be checked against Row U in external spreadsheet but only if the corresponding value in row N = Yes

Few mistakes I think I picked up here:

  • This is an array formula so MATCH..,(range1=criteria1)*(range2=criteria2) returns an array of 1s and 0s, so you can't look for your value in Sheet2!A2 like you do.
  • You also forgot that MATCH would need the third parameter to tell the function you want the first exact match.
  • Your second range is a full column and should actually match the other range to not fail.

Taken these points into consideration I think you could try:

=IFERROR(INDEX('[Soc Master List 19-20.xlsx]fullList'!$B$2:$B$20000,MATCH(1,('[Soc Master List 19-20.xlsx]fullList'!$U$2:$U$20000=Sheet2!A2)*('[Soc Master List 19-20.xlsx]fullList'!$N$2:$N$20000="Yes"),0)),"")

Because this is an array formula you'll have to enter it through the key-combination: Ctrl Shift Enter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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