ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Lookup function - can it return the higher value? (https://www.excelbanter.com/excel-discussion-misc-queries/182435-lookup-function-can-return-higher-value.html)

Xipha

Lookup function - can it return the higher value?
 
I am trying to use the VLOOKUP function, except if the value is not found I
want the function to return the value one higher than the lookup value,
instead of rounding down to the nearest value. Is there a way to do that?

Mike H

Lookup function - can it return the higher value?
 
Hi,

With your lookup table in A1 - B10 and the value to lookup in C1 try

=INDEX(B1:B10,
IF(ISNUMBER(MATCH(C1,A1:A10,0)),MATCH(C1,A1:A10,0) ,1+MATCH(C1,A1:A10,1)))

Mike

"Xipha" wrote:

I am trying to use the VLOOKUP function, except if the value is not found I
want the function to return the value one higher than the lookup value,
instead of rounding down to the nearest value. Is there a way to do that?



All times are GMT +1. The time now is 01:43 AM.

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