Weighted Average
Returns the weighted average of a set of numbers, with each
number receiving a relative weighting in the calculation
specified in a second set of numbers.
| Syntax
(Values in boldface are required; others are
optional) |
WeightedAvg(ValuesRange,
WeightsRange)
- ValuesRange:
The values to be averaged. Enter as a range.
- WeightsRange:
The relative weights assigned to the values in
calculating the average. Enter as a range.
WeightsRange must be of the same size as ValuesRange.
|
| Example |
|
In the example
below, a firm has ninety employees across three salary
levels. The simple average of the three salary levels
((750000+350000+125000)/3) is $408,333, which might be a
useful number to toss out at associate recruiting events on
campus, but doesn't give a meaningful indication of the
firm's real compensation cost per employee. The
average of the three salary levels, weighted by the number
of employees at each level, tells the real story.
 |
| Code |
| To install this function,
copy the entire contents of the window below into your
power4XL code module in Excel's Visual Basic editor.
For detailed instructions, see
the "Individual
Function Setup" page.
To copy the contents to your
clipboard, place your cursor inside the window below, then
press "CTRL+C".
NOTE: By copying the code below, you are agreeing to
the power4XL license terms. You agree to use
the code only on your personal and/or business computer(s)
for your own personal use. You agree not to
distribute, publish, alter, or edit the code in any way.
You may freely refer others to this website if you wish to
make the code available to them.
|
| Related Information
from Sponsors |
|
|
|