View Single Post
  #5  
Old June 5th, 2010, 02:37 PM posted to microsoft.public.excel.worksheet.functions
ferne
external usenet poster
 
Posts: 7
Default Simplify Weighted Average Formula

Thank you for the quick response - this is for work so can't change the
spreadsheet set up however I can definitely use the knowledge for other ones
and a second response gives me a formula for not changing setup.


--
ferne


"Tom-S" wrote:

If you could rearrange your data table then you could use SUMPRODUCT and SUM
to get you the weighted average.

Say you have cells B1 to M1 as column headers of the months Jan to Dec, and
cells A2 to A4 as row headers for Days, Oil and Gas respectively.

It sounds like from your post you want to use Days as the weightings, so
after filling in your data in cells B2 to M4, have a formula in say B5 as
follows:

=SUMPRODUCT(B$2:M$2,B3:M3)/SUM(B$2:M$2)

which gets you a weighted average for oil.

Drag-filling the formula down to B6 will get you a weighted average for gas.

Hope that helps.

Regards,

Tom


"ferne" wrote:

I have a s/s that has the months of the year across the top and below 3
categories for each month and I want a weighted avg for each product. eg:
A B C D E F G H I
January February March etc. to Dec
Days Oil Gas Days OIl Gas Days Oil Gas
6 12 200 4 5 180 7 8 300
formula: =(a1*b1+D1*E1+G1*h1)/(a1+d1+g1)

Is there a way to simplify this? Thank in advance for any help.
--
ferne