ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Row # of successful vlookup (https://www.excelbanter.com/excel-worksheet-functions/199425-row-successful-vlookup.html)

Chuck M

Row # of successful vlookup
 
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?
--
TIA
Chuck M.

JP[_4_]

Row # of successful vlookup
 
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

On Aug 19, 4:10*pm, Chuck M wrote:
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?
--
TIA
Chuck M.



Spiky

Row # of successful vlookup
 
On Aug 19, 3:10 pm, Chuck M wrote:
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?
--
TIA
Chuck M.


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

Chuck M

Row # of successful vlookup
 
Spiky & JP - Thanks to you both for your quick response. Will use MATCH
instead.
--
TIA
Chuck M.


"Spiky" wrote:

On Aug 19, 3:10 pm, Chuck M wrote:
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?
--
TIA
Chuck M.


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



All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com