+ Reply to Thread
Results 1 to 4 of 4

vlookup must return a value that is greater than

  1. #1
    BG
    Guest

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

    Re: 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


  3. #3
    Ardus Petus
    Guest

    Re: 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" <[email protected]> a écrit dans le message de news:
    [email protected]...
    > 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.




  4. #4
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 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