Standard Deviation & Weighted Average

fcalvillo

New Member
Joined
Jan 24, 2012
Messages
11
I need to calculate the standard deviation and weighted average of a large set of data. A sample of the data:

Job Title Frequency Rate
Proj Mgr 1 4 22.00
Proj Mgr 1 2 22.53
Proj Mgr 1 5 21.13
Proj Mgr 1 2 23.88
Proj Mgr 1 1 20.07
Proj Mgr 2 4 25.34
Proj Mgr 2 5 26.12
Proj Mgr 2 3 24.78
...

All of the data is within a single sheet, but there are literally thousands of rows :eek: (year's worth of data) and dozens of Job Titles. How can I produce a report similar to:

Job Title Low Rate High Rate Weighted Avg Std Dev
Proj Mgr 1 20.07 23.88 21.90 1.44
Proj Mgr 2 ...

I know I can use SUMPRODUCT/SUM to get Weighted Average and STDEV to get Standard Deviation for the individual pieces but that would take forever. Can this be done using a macro? :confused:

Thanks in advance!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I think whatever you do with well-constructed formulas will be faster than VBA.
 
Upvote 0
Hi fcalvillo,

In this instance I think you're better off to do the calculations yourself.
I'd load up a UDT Array indexed by Program Manager.

There are several concerns: f.r. are there any program managers with less than 30 records - and wouldn't you like to get the total standard deviation
The weighted average is the mean of the data - so after loading the UDT array - you could sort it with a bubble sort if the data isn't in order - etc. etc.

And the UDT Array would be persistent - you could use it all day!


<table border="0" cellpadding="0" cellspacing="0" width="342"><colgroup><col width="342"></colgroup><tbody><tr height="17"> <td style="height:12.75pt;width:257pt" height="17" width="342">You can't do one thing. XLAdept</td> </tr></tbody></table>
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,689
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top