Hi,
basically, I'm taking your INDEX/MATCH formula, but before applying the MATCH, the formula check sif the MATCH returns an error. If so, it goes on to try and find a match in the next column, and so on.
break it down into bits like this
=INDEX(Sheet2!$A$2:$A$4,
' now the MATCH bit
IF(
ISNA(MATCH(Sheet1!$B3,Sheet2!$B$2:$B$4,0)), ' if match is an error in column B then
'look at column C
IF(
ISNA(MATCH(Sheet1!$B3,Sheet2!$C$2:$C$4,0)), ' if match is an error in column C then
'look at column D and return this for MATCH
MATCH(Sheet1!$B3,Sheet2!$D$2:$D$4,0),
'else = if a match is found in column C, return this for MATCH
MATCH(Sheet1!$B3,Sheet2!$C$2:$C$4,0)),
' end of inner IF
'else = if a match is found in column B, return this for MATCH
MATCH(Sheet1!$B3,Sheet2!$B$2:$B$4,0)))
'end of outer IF
Bookmarks