Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jimd
 
Posts: n/a
Default How to use lookup to retrieve next LARGEST value?

Using 'lookup' or 'vlookup' I can determine an exact match value or the next
SMALLEST value, but not the next LARGEST value. How to I return the next
largest value?

ex.

I want to find the value of "2.2" or the next greater value in a table and
my table looks like this:

1
1.5
2
2.5
3

The answer I'm looking for would be "2.5" but lookup returns "2".

Thanks.

Jim

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default How to use lookup to retrieve next LARGEST value?

You can use the MATCH( ) function to look for either an exact match, or
the next smallest (data needs to be sorted in ascending order) OR the
next largest (data needs to be sorted in descending order). This is
controlled by the match_type parameter (the third parameter) being set
to -1.

You can use INDEX( MATCH( ) ) in a similar way as VLOOKUP(
).

Hope this helps.

Pete

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default How to use lookup to retrieve next LARGEST value?

Jimd wrote...
....
I want to find the value of "2.2" or the next greater value in a table and
my table looks like this:

1
1.5
2
2.5
3

The answer I'm looking for would be "2.5" but lookup returns "2".


Assuming you don't want to resort this list, which I'll assume is named
LST, and your value sought, 2.2, is in a cell named v, try this
formula.

=INDEX(LST,MATCH(v,LST)+(VLOOKUP(v,LST,1)<v))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default How to use lookup to retrieve next LARGEST value?

Hi,

Try this.

The following data is in range B3:B6

1
2
3
2.5

In cell B8, type 2.2. In cell E8 or wherever, enter te following array
formula (Ctrl+Shift+Enter)

=MAX(IF((B3:B6B8)*(B3:B6<INT(B8)+1),B3:B6))

If you require any clarifications, please feel free to contact me at



"Jimd" wrote:

Using 'lookup' or 'vlookup' I can determine an exact match value or the next
SMALLEST value, but not the next LARGEST value. How to I return the next
largest value?

ex.

I want to find the value of "2.2" or the next greater value in a table and
my table looks like this:

1
1.5
2
2.5
3

The answer I'm looking for would be "2.5" but lookup returns "2".

Thanks.

Jim

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sige
 
Posts: n/a
Default How to use lookup to retrieve next LARGEST value?

Hi ,
Are you not looking just for: =LARGE(list;2)
?

HTH Sige


Ashish Mathur wrote:
Hi,

Try this.

The following data is in range B3:B6

1
2
3
2.5

In cell B8, type 2.2. In cell E8 or wherever, enter te following array
formula (Ctrl+Shift+Enter)

=MAX(IF((B3:B6B8)*(B3:B6<INT(B8)+1),B3:B6))

If you require any clarifications, please feel free to contact me at



"Jimd" wrote:

Using 'lookup' or 'vlookup' I can determine an exact match value or the next
SMALLEST value, but not the next LARGEST value. How to I return the next
largest value?

ex.

I want to find the value of "2.2" or the next greater value in a table and
my table looks like this:

1
1.5
2
2.5
3

The answer I'm looking for would be "2.5" but lookup returns "2".

Thanks.

Jim




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need to retrieve dates from lookup MRT Excel Discussion (Misc queries) 5 March 27th 06 05:23 AM
Another way to lookup data David Vollmer Excel Worksheet Functions 1 September 23rd 05 05:16 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"