+ Reply to Thread
Results 1 to 9 of 9

Help with calculation of median

Hybrid View

  1. #1
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500

    Re: Help with calculation of median

    If the responses are votes, I am not sure you can calculate a median. Are reponses 1, 2, 3 ordinal? If no the answer is no to a median.

    Regards

    Dav

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with calculation of median

    Not sure about a single formula solution at the moment... but here is a way with some helper rows...

    Assuming your data is in A1:C2

    then in A3:

    =IF(ROWS(A$3:$A3)>A$2,"",A$1) copied down as far as the most number of votes you would receive.

    Then copy formulas to columns B and C

    Then use: =MEDIAN(A3:C33)

    where I have assumed up to 30 possible number of votes (ie. formula was dragged down to Row 33)

    Maybe also possible with VBA.. but don't know how.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Help with calculation of median

    If we assume your values are in B1:D2 then perhaps:

    =MEDIAN(INDEX(B1*SIGN(ROW(A1:INDEX(A:A,B2))),0),INDEX(C1*SIGN(ROW(A1:INDEX(A:A,C2))),0),INDEX(D1*SIGN(ROW(A1:INDEX(A:A,D2))),0))
    would work for you ?

+ 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