Help! Index match?

Copper Contributor
I have a file with two spreadsheets. In spreadsheet2 Cell D5, I am trying to pull in the info from spreadsheet1’s column G when it matches with a search criteria on the same row that could be in anyone of spreadsheet 1’s column A:C.

In short I’m trying to match a value that could be found in multiple columns then pull in the value that is found on that same row in column 7. I’ve had some success but only if my match is found in the first column or I only search one column.

Sorry I am unable to post the spreadsheet. 1st time user. Any help is much appreciated.
2 Replies

@Jbones hello there.

 

You could use something like this:

 

=IFERROR(INDEX(Sheet1!G1:G10,MATCH(1,MMULT(--(D5=Sheet1!A1:C10),TRANSPOSE(COLUMN(Sheet1!A1:C10)^0)),0)),"Not Found")

 

This is an array formula, known as a CSE, or a CONTROL+SHIFT+ENTER formula. Don't confirm with just ENTER. When you confirm the formula entry, ensure it's the only cell selected. Here is a good explanation of the formula:

https://exceljet.net/formula/index-and-match-on-multiple-columns

 

If you don't want to use an array formula, you'll need to enter the ranges individually, something like this:

=IFERROR(INDEX(Sheet1!G1:G10,MAX(IFERROR(MATCH($D5,Sheet1!A1:A10,0),-1),IFERROR(MATCH($D5,Sheet1!B1:B10,0),-1),IFERROR(MATCH($D5,Sheet1!C1:C10,0),-1))),"Not Found")

 

In both of these formulas, you can see I assumed the range was in rows 1 through 10, and the sheets were default names. Adjust formula accordingly to your data.

 

HTH

Got it! Thanks a lot!