ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem with vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/629-problem-vlookup.html)

Jeff

Problem with vlookup
 
Hi,

Column A1:A10 has the numbers 10-1 and B1:B10 has price of a stock.

Problem when I lookup the number = 12, it returns always the value in cell
A10.

Vlookup(12, A1:B10,2)=Value in cell B10,

But A10 = 1, and this is not close, I want the closest number which would be
10, the value in cell A1.

Is there any way to do this?

Thanks for your help

R.VENKATARAMAN

type
=vlookup(12,a1:B10,2,false)
it will give #N/A
becaue there is no number as 12 in column A.


Jeff wrote in message
...
Hi,

Column A1:A10 has the numbers 10-1 and B1:B10 has price of a stock.

Problem when I lookup the number = 12, it returns always the value in cell
A10.

Vlookup(12, A1:B10,2)=Value in cell B10,

But A10 = 1, and this is not close, I want the closest number which would

be
10, the value in cell A1.

Is there any way to do this?

Thanks for your help




dcronje


=vlookup(match(12,a1:a10,1),a1:b10,2,false)


--
dcronje
------------------------------------------------------------------------
dcronje's Profile: http://www.excelforum.com/member.php...fo&userid=5281
View this thread: http://www.excelforum.com/showthread...hreadid=320595



All times are GMT +1. The time now is 02:20 AM.

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