ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Next largest value that is greater than lookup_value. (https://www.excelbanter.com/excel-worksheet-functions/7330-next-largest-value-greater-than-lookup_value.html)

bp

Next largest value that is greater than lookup_value.
 
How do I find next largest value that is greater than lookup_value using the
lookup function or any other functions?

Peo Sjoblom

One way

=INDEX(A1:A10,MATCH(SMALL(A1:A10,COUNTIF(A1:A10,"< "&C1)+1),A1:A10,0))

where A1:A10 is the lookup range and C1 the lookup value

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"bp" wrote in message
...
How do I find next largest value that is greater than lookup_value using
the
lookup function or any other functions?




Jason Morin

One way:

=MIN(IF(A1:A10C1,A1:A10))

Array-entered, meaning press ctrl/shift/enter. Your range
to evaluate is A1:A10 and C1 holds the lookup value.

HTH
Jason
Atlanta, GA

-----Original Message-----
How do I find next largest value that is greater than

lookup_value using the
lookup function or any other functions?
.


Jason Morin

Hi Peo. I think you mean <= , not < .

Jason

-----Original Message-----
One way

=INDEX(A1:A10,MATCH(SMALL(A1:A10,COUNTIF(A1:A10," <"&C1)

+1),A1:A10,0))

where A1:A10 is the lookup range and C1 the lookup value

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"bp" wrote in message
...
How do I find next largest value that is greater than

lookup_value using
the
lookup function or any other functions?



.


Peo Sjoblom

Hi Jason,

it depends on if the OP really wants the next larger value even if it is an
exact match, I wasn't sure about that

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"Jason Morin" wrote in message
...
Hi Peo. I think you mean <= , not < .

Jason

-----Original Message-----
One way

=INDEX(A1:A10,MATCH(SMALL(A1:A10,COUNTIF(A1:A10, "<"&C1)

+1),A1:A10,0))

where A1:A10 is the lookup range and C1 the lookup value

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"bp" wrote in message
...
How do I find next largest value that is greater than

lookup_value using
the
lookup function or any other functions?



.





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

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