weighted average from table

C

Cam

Please help!

Here is the situation:
I need to deternime a weighted average of a set of values for a given
period. I have setup an example below:

period Col 2 Col 3
1 5 100
1 7 200
2 9 100
2 7 200

what would be the best formula to determine the weighted average value of
column 3 weighted on the basis of column 2 by period?

Any help would be appreciated.
 
S

smartin

Cam said:
Please help!

Here is the situation:
I need to deternime a weighted average of a set of values for a given
period. I have setup an example below:

period Col 2 Col 3
1 5 100
1 7 200
2 9 100
2 7 200

what would be the best formula to determine the weighted average value of
column 3 weighted on the basis of column 2 by period?

Any help would be appreciated.

Or, referencing a cell that contains the period value,

=SUMPRODUCT(($A$1:$A$4=$A1)*($B$1:$B$4*$C$1:$C$4))/SUMPRODUCT(($A$1:$A$4=$A1)*($B$1:$B$4))
 
S

Shane Devenshire

Hi,

If you can tolerate an array formula then:

=SUM((A1:A4=1)*(B1:B4*C1:C4)/SUM(B1:B4*(A1:A4=1)))

Array entered - Shift+Ctrl+Enter instead of Enter.

Cheers,
Shane Devenshire
 
S

Shane Devenshire

Hi,

I see there is one additional minor simplification to my previous post

=SUM((A1:A4=1)*B1:B4*C1:C4/SUM(B1:B4*(A1:A4=1)))

Still array entered.

Cheers,
Shane Devenshire
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top