![]() |
Lookups
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. |
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. |
All times are GMT +1. The time now is 07:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com