ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   FIND FORMULA SIMILAR TO VLOOKUP FOR NON-ASCENDING VALUES (https://www.excelbanter.com/excel-worksheet-functions/54909-find-formula-similar-vlookup-non-ascending-values.html)

Kir

FIND FORMULA SIMILAR TO VLOOKUP FOR NON-ASCENDING VALUES
 
I am trying to determine a lookup or find formula that will find data in 1
column and return the data from the 2nd column but the data in the 1st column
is not in ascending order and I do not want to sort it to be in ascending
order.

Ex A B
1 Sue 5
2 Bob 3
3 Max 4

I want to find Sue and return value 5 for this above array and I do not want
to sort the data.

Bob Phillips

FIND FORMULA SIMILAR TO VLOOKUP FOR NON-ASCENDING VALUES
 
=INDEX(B:B,MATCH("Sue",A:A,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kir" wrote in message
...
I am trying to determine a lookup or find formula that will find data in 1
column and return the data from the 2nd column but the data in the 1st

column
is not in ascending order and I do not want to sort it to be in ascending
order.

Ex A B
1 Sue 5
2 Bob 3
3 Max 4

I want to find Sue and return value 5 for this above array and I do not

want
to sort the data.




Harlan Grove

FIND FORMULA SIMILAR TO VLOOKUP FOR NON-ASCENDING VALUES
 
Bob Phillips wrote...
=INDEX(B:B,MATCH("Sue",A:A,0)

....

Uh, why not

=VLOOKUP("Sue",A:B,2,0)

?

Unlike 123 and possibly Quattro Pro, Excel's VLOOKUP includes and
optional 4th parameter that defaults (default value TRUE or 1) to
assuming the first column is sorted in ascending order, and matches the
largest value in the first col less than or equal to the lookup value.
When the 4th argument is FALSE or 0, VLOOKUP uses exact matching and
linear searching, and only finds exact (well, case-insensitive)
matches. [This is for the OP's benefit, not Bob's.]



All times are GMT +1. The time now is 02:03 PM.

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