SOLVED

Vlookup to return the value at the same lookup value row

Copper Contributor

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?

 

C_Wong1385_0-1718192721555.png

 

4 Replies
best response confirmed by C_Wong1385 (Copper Contributor)
Solution

@C_Wong1385 

In AA23:

=INDEX(AN23:AX23, MATCH(N23, AM23:AW23, 0))

or

=INDEX(AN23:AX23, XMATCH(N23, AM23:AW23))

@C_Wong1385 

In AA23 =VLOOKUP (AA23, INDIRECT ("AS" & ROW(AA23) & ": AT"), 2, 0)

@Hans Vogelaar 

Thank you. It works and much better than doing vlookups.

Thank you. I am beginning to believe INDEX MATCH is better than vlookups now.
1 best response

Accepted Solutions
best response confirmed by C_Wong1385 (Copper Contributor)
Solution

@C_Wong1385 

In AA23:

=INDEX(AN23:AX23, MATCH(N23, AM23:AW23, 0))

or

=INDEX(AN23:AX23, XMATCH(N23, AM23:AW23))

View solution in original post