Forum Discussion
C_Wong1385
Jun 12, 2024Copper Contributor
Vlookup to return the value at the same lookup value row
Vlookup returns the first value it matches.
Is there a way for it to return the value on the same row as the lookup value?
Example below
LookUp N23
Column AT Row 20 value is 1.61
Column AT Row 23 value is 1.08
How do I return the value of 1.08 which is in Row 23?
In AA23:
=INDEX(AN23:AX23, MATCH(N23, AM23:AW23, 0))
or
=INDEX(AN23:AX23, XMATCH(N23, AM23:AW23))
4 Replies
- Jothiraja_MCopper Contributor
In AA23 =VLOOKUP (AA23, INDIRECT ("AS" & ROW(AA23) & ": AT"), 2, 0)
- C_Wong1385Copper ContributorThank you. I am beginning to believe INDEX MATCH is better than vlookups now.
In AA23:
=INDEX(AN23:AX23, MATCH(N23, AM23:AW23, 0))
or
=INDEX(AN23:AX23, XMATCH(N23, AM23:AW23))
- C_Wong1385Copper Contributor
Thank you. It works and much better than doing vlookups.