ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vlookup, next value (https://www.excelbanter.com/excel-discussion-misc-queries/146500-vlookup-next-value.html)

Alexandre Campeau

Vlookup, next value
 
Hi,

I am doing a vertical seach in a matrix.
Let's say:
1 10
2 20
3 30
4 40

If I enter =Vlookup(2.5;matrix;2)
I obtain 20.

However, I would like to have the next value, 30 !

I have seach a lot and I have tried formulas like "Cells" but nothing worked.

How can i do that?

Thank you very much,

Alex


Socratis

Vlookup, next value
 
Alexandre, try this out:

=VLOOKUP(ROUNDUP(2.5,0),matrix,2)

The ROUNDUP() function rounds the number up to basically 3 and thus matches
the 30 you are looking for.

Cheers,
Socratis

"Alexandre Campeau" wrote:

Hi,

I am doing a vertical seach in a matrix.
Let's say:
1 10
2 20
3 30
4 40

If I enter =Vlookup(2.5;matrix;2)
I obtain 20.

However, I would like to have the next value, 30 !

I have seach a lot and I have tried formulas like "Cells" but nothing worked.

How can i do that?

Thank you very much,

Alex


Lacty

Vlookup, next value
 

Alex

You might want to create a "helper" cell. If say your value 2.5 is in
cell A1, in B1 enter the formula = Round(A1, 0 )

The Round function will round 2.5 to 3 and 2.4 to 2. Otherwise use the
Roundup function which will round any number from 2..01 and 2.99 to 3

then Use the value in B1 in your Vlookup formula


Hope this helps



All times are GMT +1. The time now is 11:42 AM.

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