Closed Thread
Results 1 to 8 of 8

Median of Even Set; How to Capture them?

  1. #1
    Mike
    Guest

    Median of Even Set; How to Capture them?

    Hi everyone,

    Say I have a dat set such as:

    4
    5
    6
    7

    The median is (5+6)/2=5.5!

    However, I am not interested in the answer here, but the 5 and the 6!!!

    Is there an excel function or way to do so?

    Thanks alot,
    Mike


  2. #2
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    Do you want the output in one single cell or in 2 separate cells?


    Quote Originally Posted by Mike
    Hi everyone,

    Say I have a dat set such as:

    4
    5
    6
    7

    The median is (5+6)/2=5.5!

    However, I am not interested in the answer here, but the 5 and the 6!!!

    Is there an excel function or way to do so?

    Thanks alot,
    Mike

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Here is one solution to find "the Reversed Median".

    Value One:
    =IF(ISODD(COUNT(A1:A6)),INDEX(LARGE(A1:A6,ROW(INDIRECT("1:"&COUNT(A1:A6)))),(COUNT(A1:A6)+1)/2),INDEX(LARGE(A1:A6,ROW(INDIRECT("1:"&COUNT(A1:A6)))),(COUNT(A1:A6))/2))

    Value Two:
    =IF(ISODD(COUNT(A1:A6)),"",INDEX(LARGE(A1:A6,ROW(INDIRECT("1:"&COUNT(A1:A6)))),(COUNT(A1:A6)+2)/2))

    Example:
    1, 2, 2, 4, 5, 6 --> 2 and 4
    1, 2, ,4, 5, 6 --> 4

    Hope it helped
    Ola Sandström


    Attached zip-file: http://www.excelforum.com/attachment...tid=3648&stc=1
    Attached Files Attached Files

  4. #4
    Mike
    Guest

    Re: Median of Even Set; How to Capture them?

    Morrigan,

    I want them in TWO different cells........thanks,

    Mike


  5. #5
    Mike
    Guest

    Re: Median of Even Set; How to Capture them?

    Olasa,

    Tried your formula, but none of them did work!

    Have you tried them on an example to see if they are working as they
    appear above?

    Mike


  6. #6
    Jerry W. Lewis
    Guest

    Re: Median of Even Set; How to Capture them?

    Those are awfully complex formulas for a simple calculation. Why not
    =LARGE(A1:A6,COUNT(A1:A6)/2)
    for the median (if n odd) or the larger middle value (if n even), and
    =IF(ISEVEN(COUNT($A$1:$A$6)),SMALL($A$1:$A$6,COUNT($A$1:$A$6)/2),"")
    for the smaller middle value (if n even)

    Jerry

    olasa wrote:

    > Here is one solution to find "the Reversed Median".
    >
    > Value One:
    > =IF(ISODD(COUNT(A1:A6)),INDEX(LARGE(A1:A6,ROW(INDIRECT("1:"&COUNT(A1:A6)))),(COUNT(A1:A6)+1)/2),INDEX(LARGE(A1:A6,ROW(INDIRECT("1:"&COUNT(A1:A6)))),(COUNT(A1:A6))/2))
    >
    > Value Two:
    > =IF(ISODD(COUNT(A1:A6)),"",INDEX(LARGE(A1:A6,ROW(INDIRECT("1:"&COUNT(A1:A6)))),(COUNT(A1:A6)+2)/2))
    >
    > Example:
    > 1, 2, 2, 4, 5, 6 --> 2 and 4
    > 1, 2, ,4, 5, 6 --> 4
    >
    > Hope it helped
    > Ola Sandström



  7. #7
    Mike
    Guest

    Re: Median of Even Set; How to Capture them?

    Jerry,

    I agree, your 1st formula is working fine but the 2nd one is NOT!?

    Could you please check it?

    Thanks,
    Mike


  8. #8
    Mike
    Guest

    Re: Median of Even Set; How to Capture them?

    Jerry,

    Yours are BOTH working now.....thank you ALL

    Thanks alot,
    Mike


Closed 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