Row # of successful vlookup

C

Chuck M

Hi - Is there any way to know what the row # of a successful vlookup is?

Ex. From the following 2 column, 3 row lookup range:

col 1 col 2
row 1 John A
row 2 Tom B
row 3 Jim C

Vlookup(lookup range,"Tom",2,False) returns 'B'. Is there any way to know
that B is on row 2 of the lookup range?
 
J

JP

MATCH function returns the position of lookup_value in lookup_array.

If your example started in A1, this formula would return the row
number of "B" which is 2:

=MATCH(VLOOKUP("Tom",A1:B3,2,FALSE),B1:B3,0)


HTH,
JP
 
S

Spiky

Hi - Is there any way to know what the row # of a successful vlookup is?

Ex. From the following 2 column, 3 row lookup range:

col 1 col 2
row 1 John A
row 2 Tom B
row 3 Jim C

Vlookup(lookup range,"Tom",2,False) returns 'B'. Is there any way to know
that B is on row 2 of the lookup range?

No. So use Match instead.
MATCH("Tom",lookup_range,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top