Reputation: 492
I have an Excel formula that matches a cell on one spredsheet and searches through a column on another, then returns the contents of adjacent cells to that column for any matches. The problem is I need to search through two different columns for that match, and if either of the columns contains the match, return another adjacent cell. I have tried using:
=INDEX('PNO Lookup'!$A:$A,MATCH(Summary!D25,'PNO Lookup'!$G:$J,0))
which should search from column G to column J, but I get a #VALUE error. Can anyone explain how I would search both column G and J for the value in cell D25?
Upvotes: 1
Views: 1935
Reputation:
Along the same idea as the previous answer but a little shorter.
=INDEX('PNO Lookup'!$A:$A, IFERROR(MATCH(Summary!D25, 'PNO Lookup'!$G:$G, 0),
IFERROR(MATCH(Summary!D25, 'PNO Lookup'!$H:$H, 0),
IFERROR(MATCH(Summary!D25, 'PNO Lookup'!$I$I, 0),
MATCH(Summary!D25, 'PNO Lookup'!$J:$J, 0)))))
Upvotes: 2
Reputation: 152660
use:
=INDEX('PNO Lookup'!$A:$A,MIN(IFERROR(MATCH(Summary!D25,'PNO Lookup'!$G:$G,0),1E+99),IFERROR(MATCH(Summary!D25,'PNO Lookup'!$J:$J,0),1E+99)))
Upvotes: 2