+ Reply to Thread
Results 1 to 9 of 9

Median

  1. #1
    Registered User
    Join Date
    02-23-2011
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2013
    Posts
    29

    Median

    in column a1 to a5000 i have dates , multiple entries for different dates, in column b1 to b5000 i have values for each row, i need in column c to take the median of all the values in b that share the sme date in column a and to display this median on all rows in column c as i need to use these figures to do a calculation for each row individually, i am relatively new to excel 2010 but can find the average but need the median, i am stumped, please can somebody help it if it is possible
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,856

    Re: help with medians

    Welcome to the forum!

    In your sample data the data is sorted ascending by date. Will this always be true? If so then this formula will work in C2, copy down

    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: help with medians

    Try this in C2 dragged down. It needs to be entered as an Array (CNTRL SHFT ENTER rather than a simple ENTER). If entered properly, you'll see {} around your formula

    =MEDIAN(IF($A$2:$A$76=A2,$B$2:$B$76,""))

    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    02-23-2011
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: help with medians

    Quote Originally Posted by 6StringJazzer View Post
    Welcome to the forum!

    In your sample data the data is sorted ascending by date. Will this always be true? If so then this formula will work in C2, copy down

    Please Login or Register  to view this content.
    thanks will have a go at that , the data will not always be in ascending order they will be sorted often and could be jumbled up is there a solution if this is the case, my spreadsheet is massive with many calculations , the example i posted is just a mock up to see if it was possible

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: help with medians

    My formula will not require sorting but depending on the complexity of your spreadsheet, might slow down the calculations. (Array formulas have a tendancy to do that)

  6. #6
    Registered User
    Join Date
    02-23-2011
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: help with medians

    Quote Originally Posted by ChemistB View Post
    My formula will not require sorting but depending on the complexity of your spreadsheet, might slow down the calculations. (Array formulas have a tendancy to do that)
    thanks ChemistB, that looks excellent will try it on my big speadsheet but works really well on my example, excellent swift help on this forum, been googling like madman and couldn't find an answer , looks like i might have it now thanks to you guys, cheers

  7. #7
    Registered User
    Join Date
    02-23-2011
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: help with medians

    Quote Originally Posted by ChemistB View Post
    Try this in C2 dragged down. It needs to be entered as an Array (CNTRL SHFT ENTER rather than a simple ENTER). If entered properly, you'll see {} around your formula

    =MEDIAN(IF($A$2:$A$76=A2,$B$2:$B$76,""))

    Does that work for you?
    just checked this on my big spreadsheet and it appears you have solved the problem for me , many thanks

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: help with medians

    Glad to help.

  9. #9
    Registered User
    Join Date
    02-23-2011
    Location
    Cheshire, England
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Median

    ChemistB,s answer was perfect for getting the median of the data i have
    =MEDIAN(IF($A$2:$A$76=A2,$B$2:$B$76,""))

    Anybody know how i could get the 15th percentile or the first quartile of the same data, cheers Mike
    Last edited by speedrater; 03-02-2011 at 01:40 PM. Reason: spelling

+ 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