+ Reply to Thread
Results 1 to 2 of 2

Lookups-an exact match is not found

  1. #1
    Mike O'Donnell, Columbia MD
    Guest

    Lookups-an exact match is not found

    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. #2
    Biff
    Guest

    re: Lookups-an exact match is not found

    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:H1>A1,C1:H1)))

    Format the cell as DATE

    Biff

    "Mike O'Donnell, Columbia MD" <Mike O'Donnell, Columbia
    [email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1