+ Reply to Thread
Results 1 to 5 of 5

Lookup Max and Min Values in a List

  1. #1
    Registered User
    Join Date
    09-23-2003
    Posts
    18

    [B]Lookup Max and Min Values in a List[/B]

    Lookup Max and Min Values in a List

    Given a number I want to look up what number in a list is just greater and just less than my original number.

    Ex. Given number 55 look at the following list of values:

    22
    33
    44
    55
    66
    77

    and in one cell return 44 and another 66. Seems easy but I can't get it. Thanks.
    Last edited by jpx; 08-24-2005 at 03:39 PM.

  2. #2
    Registered User
    Join Date
    09-23-2003
    Posts
    18
    ?????????????????

  3. #3
    Registered User
    Join Date
    09-23-2003
    Posts
    18
    ??????????????????

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that A1:A6 contains your list, try...

    =MIN(IF(A1:A6>55,A1:A6))

    and

    =MAX(IF(A1:A6<55,A1:A6))

    Both formulas need to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

    Hope this helps!

    Quote Originally Posted by jpx
    Lookup Max and Min Values in a List

    Given a number I want to look up what number in a list is just greater and just less than my original number.

    Ex. Given number 55 look at the following list of values:

    22
    33
    44
    55
    66
    77

    and in one cell return 44 and another 66. Seems easy but I can't get it. Thanks.

  5. #5
    Bob Phillips
    Guest

    Re: Lookup Max and Min Values in a List

    If the value will exist

    =INDEX(A:A,MATCH(55,A:A,0)-1)

    or maybe even

    =INDEX(A:A,IF(ISNUMBER(MATCH(B1,A:A,0)),MATCH(B1,A:A,0)-1),MATCH(A:A,B1,-1))

    if it may not exist

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "jpx" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi
    >
    > Given a number I want to look up what number in a list is just greater
    > and just less than my original number.
    >
    > Ex. Given number 55 look at the following list of values:
    >
    > 22
    > 33
    > 44
    > 55
    > 66
    > 77
    >
    > and in one cell return 44 and another 66. Seems easy but I can't get
    > it. Thanks.
    >
    >
    > --
    > jpx
    > ------------------------------------------------------------------------
    > jpx's Profile:

    http://www.excelforum.com/member.php...fo&userid=1013
    > View this thread: http://www.excelforum.com/showthread...hreadid=398709
    >




+ 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