Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BG
 
Posts: n/a
Default vlookup must return a value that is greater than

If a value is not found in a range, I would like it to return the smallest
value greater than itself.


A B C
i.e. 8 2
10 4
12 6

By default if I searched for 9, and needed the info from column C, I would 2
as my result, but instead I would like to get 4 as the result.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default vlookup must return a value that is greater than

Sort your lookup data on col A descending
=INDEX(C1:C3,MATCH(9,A1:A3,-1))

HTH
--
AP

"BG" a écrit dans le message de news:
...
If a value is not found in a range, I would like it to return the smallest
value greater than itself.


A B C
i.e. 8 2
10 4
12 6

By default if I searched for 9, and needed the info from column C, I would
2
as my result, but instead I would like to get 4 as the result.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default vlookup must return a value that is greater than

If you use MATCH( ) then you will get the (relative) position in the
range - you can add 1 onto this and feed this into an INDEX( ) function
to get what you want.

Hope this helps.

Pete

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default vlookup must return a value that is greater than

What if that relative is an exact match or the last one?

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Pete_UK" wrote in message
oups.com...
If you use MATCH( ) then you will get the (relative) position in the
range - you can add 1 onto this and feed this into an INDEX( ) function
to get what you want.

Hope this helps.

Pete



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
How do I return a blank for VLOOKUP instead of #N/A? ExcelBee Excel Worksheet Functions 15 September 3rd 05 07:04 AM
Excel 2000 VLOOKUP returns #N/A unless press F2 return on source? Colin Excel Worksheet Functions 3 August 31st 05 01:10 PM
vlookup - finding the next value that is GREATER than the lookup value? Harold Good Excel Worksheet Functions 6 August 10th 05 10:32 PM
Want VLookup to Return the row above JoOwl0 Excel Worksheet Functions 8 April 23rd 05 07:16 PM
Vlookup of an if statement return James Excel Worksheet Functions 2 April 6th 05 10:28 PM


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

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

About Us

"It's about Microsoft Excel"