Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Simplify Weighted Average Formula

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
Default Simplify Weighted Average Formula

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default Simplify Weighted Average Formula

On Fri, 4 Jun 2010 21:04:38 -0700, 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.


If you don't want to rearrange your data, try this formulas:

For the "days-weighted" average of Oil:

=SUMPRODUCT((A2:AH2="Days")*A3:AH3*B3:AI3)/SUMIF(A2:AH2,"Days",A3:AH3)

For the "days-weighted" average of Gas:

=SUMPRODUCT((A2:AH2="Days")*A3:AH3*C3:AJ3)/SUMIF(A2:AH2,"Days",A3:AH3)

Hope this helps / Lars-Åke
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Simplify Weighted Average Formula

Thanks so much - this will work perfectly and saves me so much time as my
formula would have been too long.
--
ferne


"Lars-Ã…ke Aspelin" wrote:

On Fri, 4 Jun 2010 21:04:38 -0700, 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.


If you don't want to rearrange your data, try this formulas:

For the "days-weighted" average of Oil:

=SUMPRODUCT((A2:AH2="Days")*A3:AH3*B3:AI3)/SUMIF(A2:AH2,"Days",A3:AH3)

For the "days-weighted" average of Gas:

=SUMPRODUCT((A2:AH2="Days")*A3:AH3*C3:AJ3)/SUMIF(A2:AH2,"Days",A3:AH3)

Hope this helps / Lars-Ã…ke
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to calulate the weighted average Jrf Excel Discussion (Misc queries) 4 April 1st 09 05:09 AM
Formula for Weighted Average MJ Excel Discussion (Misc queries) 2 May 12th 08 04:08 AM
Moving Weighted Average formula Ori Excel Discussion (Misc queries) 5 August 17th 06 11:03 PM
calculating a weighted average using formula bob green Excel Worksheet Functions 1 August 1st 05 10:33 PM
What is the formula for weighted average? Seth23hare Excel Worksheet Functions 1 November 23rd 04 08:49 PM


All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"