+ Reply to Thread
Results 1 to 7 of 7

Find Median value when totals are summed and not in a range

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Find Median value when totals are summed and not in a range

    Hello - this has been bugging me.

    I want to find the median value (in this case it is an exam grade but that's just for an example) where I only have the total number of students that achieved each grade. So I know there are 100 Grade A, 200 Grade B, 300 Grade D and so on. I might end up with a sample of thousands of students. It would be unfeasible to list individual scores in a range in order to determine the median grade that way so is there a way to do it using a formula when all I know is the totals for each grade? I also want to plot the summary on a bar chart and show the median grade.

    i attach an example sheet if that's any use.

    Any help solving this would be great. Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find Median value when totals are summed and not in a range

    Hi.

    Maybe:

    =INDEX(A11:A15,MATCH(TRUE,MMULT(N(ROW(INDEX(A:A,1):INDEX(A:A,COUNTA(A11:A15)))>=COLUMN(INDEX(1:1,1):INDEX(1:1,COUNTA(A11:A15)))),B11:B15)>=SUM(B11:B15)/2,0))

    though you haven't clarified what the result should be were you to have an odd number of values in your list and the median fell between two subtotals.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Find Median value when totals are summed and not in a range

    To find median in non-numerical range like grades:
    - in C11 write 0
    - in C12:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down to one row below data (C16)
    - in B18:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    so you have formula returninhg your C
    Best Regards,

    Kaper

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Find Median value when totals are summed and not in a range

    To display this value on the graph in some empty column (say in cell N11) I'd write:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    copy this doen and use as a source for second series. Then I'd add error bars (100%, both negative and positive) and format them to mimmic the line
    Or may be no /2 in the formula and only negative error bar would look better?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Find Median value when totals are summed and not in a range

    Thaniks both for your help with this.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Find Median value when totals are summed and not in a range

    given that the grades are listed in order you could try this formula to give the median grade

    =LOOKUP(SUM(B11:B15)/2,SUBTOTAL(9,OFFSET(B10,0,0,ROW(B11:B15)-ROW(B11)+1)),A11:A15)

    If the median value is halfway between 2 consecutive grades this will give you the lower of the two
    Audere est facere

  7. #7
    Registered User
    Join Date
    10-24-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Find Median value when totals are summed and not in a range

    Quote Originally Posted by daddylonglegs View Post
    given that the grades are listed in order you could try this formula to give the median grade

    =LOOKUP(SUM(B11:B15)/2,SUBTOTAL(9,OFFSET(B10,0,0,ROW(B11:B15)-ROW(B11)+1)),A11:A15)

    If the median value is halfway between 2 consecutive grades this will give you the lower of the two
    Thanks for the help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Median Indirect: Find median in range and bring back adjacent cells
    By Keelin in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-27-2014, 08:31 AM
  2. How do find Median of a set of totals and find the relating grade
    By whitespaces in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-12-2006, 11:16 AM
  3. Pivot Table Totals Incorrectly Summed
    By Ms MIS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2006, 01:30 PM
  4. [SOLVED] Find Median of Positive numbers only in Range
    By MichaelC in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] Find Median of Positive numbers only in Range
    By MichaelC in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

Tags for this Thread

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