Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
In HLOOKUP, If an exact match is not found, the next largest value that is
less than lookup_value is returned. I have a row of dates and I want the next smallest value that is greater than lookup_value, which is NOW(). So if today is 5/13/05 and the entries in the row are 3/1/05, 3/15/05, 4/16/05, 5/3/05, 5/20/05 and 5/22/05, I would want the value 5/20/05 returned, not the value 5/3/05 as VLOOKUPO would do. Is there an easy way to do that? Thanks in advance. |
#2
![]() |
|||
|
|||
![]()
Hi!
Here's one way: Entered with the key combo of CTRL,SHIFT,ENTER: Assume your lookup value is in cell A1 and the lookup dates are in the range C1:H1: =IF(OR(MAX(C1:H1)<A1,A1=""),"",MIN(IF(C1:H1A1,C1: H1))) Format the cell as DATE Biff "Mike O'Donnell, Columbia MD" <Mike O'Donnell, Columbia wrote in message ... In HLOOKUP, If an exact match is not found, the next largest value that is less than lookup_value is returned. I have a row of dates and I want the next smallest value that is greater than lookup_value, which is NOW(). So if today is 5/13/05 and the entries in the row are 3/1/05, 3/15/05, 4/16/05, 5/3/05, 5/20/05 and 5/22/05, I would want the value 5/20/05 returned, not the value 5/3/05 as VLOOKUPO would do. Is there an easy way to do that? Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying data within worksheets with lookups | Excel Discussion (Misc queries) | |||
multiple lookups - xls2003 | Excel Worksheet Functions | |||
Lookups vs Match | Excel Worksheet Functions | |||
Menus and Lookups | Excel Discussion (Misc queries) | |||
Double Lookups | Excel Worksheet Functions |