airbonicsam
New member
- Joined
- Sep 6, 2016
- Messages
- 2
- Reaction score
- 0
- Points
- 0
Good Afternoon,
Above is the data I am trying to get a formula for. What I am trying to do is get a weighted average for sales columns i.e. (April - August). I have assigned weights as below.
April = 1
May = 2
June = 3
July = 4
August = 5
I then multiply the sales for each month by their respective weights: So for Dave:
April = 23214.95 x 1 = 23214.95
May = 19006.90 x 2 = 38013.80
and so on till august.
I then add these products all up and to get the weighted average I divide this total by the sum of the weights, which in this case is 15.
My long and probably inefficient formula for this is :
=SUM(SUM(A2*1)+(C2*2)+(E2*3)+(G2*4)+(I2*5))/15.
This does work. However the problem comes with Paul and John. Some of the months they have had NO sales. Using the formula above works but gives a distorted Weighted Average because it still divides by the sum of ALL the weights (15), even though some of the months had 0 sales.
What would be the best formula to use so that I could divide by the sum of all the weights only for months where there were sales. So in Paul's case weights that would be summed are:
May = 2
June = 3
August = 5
Total of = 10.
The result would go in the Weighted Average Column.
The formula would have to skip the columns entitled "Margin" as well.
Appreciate the help. Can provide any more info needed.
Thanks in Advance,
Sam.
April Sales | Margin | May Sales | Margin | June Sales | Margin | July Sales | Margin | August Sales | Margin | Weighted Average | |
Dave | 23214.95 | 16.58% | 19006.90 | 28.39% | 18506.69 | 22.74% | 16851.72 | 18.14% | 20876.92 | 21.15% | 19236.02 |
Paul | 0.00 | 0.00% | 7080.30 | 46.45% | 12353.49 | 41.42% | 0.00 | 0.00% | 13112.52 | 42.05% | 7785.58 |
John | 0.00 | 0.00% | 0.00 | 0.00% | 0.00 | 0.00% | 0.00 | 0.00% | 9722.76 | 22.82% | 3240.92 |
Above is the data I am trying to get a formula for. What I am trying to do is get a weighted average for sales columns i.e. (April - August). I have assigned weights as below.
April = 1
May = 2
June = 3
July = 4
August = 5
I then multiply the sales for each month by their respective weights: So for Dave:
April = 23214.95 x 1 = 23214.95
May = 19006.90 x 2 = 38013.80
and so on till august.
I then add these products all up and to get the weighted average I divide this total by the sum of the weights, which in this case is 15.
My long and probably inefficient formula for this is :
=SUM(SUM(A2*1)+(C2*2)+(E2*3)+(G2*4)+(I2*5))/15.
This does work. However the problem comes with Paul and John. Some of the months they have had NO sales. Using the formula above works but gives a distorted Weighted Average because it still divides by the sum of ALL the weights (15), even though some of the months had 0 sales.
What would be the best formula to use so that I could divide by the sum of all the weights only for months where there were sales. So in Paul's case weights that would be summed are:
May = 2
June = 3
August = 5
Total of = 10.
The result would go in the Weighted Average Column.
The formula would have to skip the columns entitled "Margin" as well.
Appreciate the help. Can provide any more info needed.
Thanks in Advance,
Sam.