

Then the (estimated) weighted median is (9.025): Construct a helper column with the cumulative counts. This is due to the method of estimating the weighted median that I alluded to before.

So i tried to calculate the median by hand and got 9,03 as a result. I've included instructions below, in case you are still interested. Perhaps it is just a matter of knowing how. I don't know why you would be prevented ("cannot") from creating and executing the VBA code. The VBA code is really helpful, but i cannot enter it my excel wont execute

The VBA function returns an actual median.Īlternatively, there is a method for estimating the weighted median of grouped data. WeightedMedian = WorksheetFunction.Median(vdata) Where weightedMedian is the following VBA code in a normal module (not a worksheet object):įunction weightedMedian(v As Range, cnt As Range)ĭim n As Long, k As Long, i As Long, j As Longįor i = 1 To v.Rows.Count: For j = 1 To cnt(i) Translate English function names appropriately. Read period as the decimal point (comma, for you). Standard deviation 6,670011739 variance 44,4890566Ĭaveat: Change parameter separators from comma to semicolon.
