Calculation of average based on a weighted score - excel-formula

I'm trying to calculate an average score based on a list of parameter scores (between 0 and 5). The trick is that I want to be able to weight each parameter.
Eg:
Parameter A Parameter B Parameter C
Weight 100% 70% 0%
Score 4 5 0
In the above example, the average score should be 3,75 as parameter c is left out.
I've tried with this formula: =IF.ERROR(SUM((A3*A5);(B3*B5);(C3*C5))/COUNTA(A3:C3);""). The formula seems to work if none of the parameters weight is equal to 0. How can I adjust the formula, so it excludes a score if weight is equal to zero?
I think it should be rather easy, I just can't get it to work.

Check this :
=SUMPRODUCT( A2:A4, B2:B4 ) / SUM( B2:B4 )
Source : https://exceljet.net/formula/weighted-average

With COUNTA you are counting the non empty cells, while you should count the non zero cells. So, assuming that the weights are in A3:C3 and the scores in A5:C5:
=IFERROR(SUMPRODUCT(A3:C3;A5*C5)/COUNTIF(A3:C3;">0");"Error: all the weigths are 0")

It would be like this:
(1*4 + 0.7*5) / 2 = 3.75
In other world the formula is:
((WeightA/100 * scoreA) + (WeightB/100 * scoreB) + (WeightC/100 * scoreC)) / 3

=SUMPRODUCT(A1:A3;B1:B3) / COUNTIF(B1:B3;"<>0") / 100
Something like this would work

Related

Formula to Calculate Subscriber Churn Revenue

I'm trying to sum up 12 months of subscriber revenue factoring a 6% monthly churn (assuming no signups) to come up with the one-year value of a subscriber. A simple future value gives me the start and end values, but I'm looking to get the sum of the monthly declining revenues in a single Excel / Google Sheets formula. I can make 11 entries (plus the starting month full value), but is there a better one-liner or formula for this?
This gives me the 12th-month revenue:
=FV(-6%,11,0,100)
I'd like to get the sum without this:
=100 + FV(-6%,1,0,100) + FV(-6%,2,0,100) ... FV(-6%,11,0,100)
You are looking for the sum of a finite geometric series:
1 + r + r^2 + r^3 .... + r^11
And the sum of this series is
(1 - r^12) / (1 - r)
where r = 1 - 6%
So the formula would be
= (1 - (1-6%)^12 ) / (1 - (1-6%) ) * 100
This is assuming the OP meant
=100 + FV(-6%,1,0,-100) + FV(-6%,2,0,-100) ... FV(-6%,11,0,-100)
as FV(-6%,1,0,100) would output a negative number
I don't know much about such math but would the following formula give you the result?
=100+SUMPRODUCT(FV(-6%,ROW(1:11),0,-100))
The formula works in both Excel and Google Spreadsheets

Simulation on Excel with 6 possibilities with different probabilities

So I have a table that looks like this
Arrival Time Probability
0 .09
1 .17
2 .27
3 .2
4 .15
5 .12
And I want excel to randomly create one of the 6 arrival time values based on the given probabilities using RAND(). Is there any way to do this other than to have nested If loops?
here's what I came up with.
I would add a column C that calculates the cumulative brackets from 0-1 each digit would represent. If you start with zero and use formulas to calculate your brackets, you can change the probability if needed in the future. (formulas in photo below)
For example, arrival time of 0 would be between 0 and .09.
Then you can use use the rand() function in column D to generate your random number between 0 and 1 and add a lookup function in column E, or wherever you like. Screenshots of the data and formulas:
Replace your probabilities with cumulative probabilities (with a preliminary line for 0) and use VLOOKUP, exploiting the fact that VLOOKUP finds the closest match:

If greater than multiply by result, if not don't

Trying to do an if else statement, if the results of the index query is greater than the other. I want it to go like this:
If index query / index query's result is greater than 1, multiply the formula by the percentage it is greater than 1.
For example
If 10 / 5 is greater than 1, multiply it by the sum of (4 * 3), else, don't multiply it and just do the sum.
=IF(
INDEX(AK:AK,MATCH($A3,M:M,0))>INDEX(AL:AL,MATCH($A4,M:M,0)),
SUM(B12*E13*R24)*(INDEX(AK:AK,MATCH($A3,M:M,0),SUM(B12*E13*R24)))
)
not getting anywhere with this.
It seems that this can be reduced down to multiplying your base calculation by either 1 or the quotient of the two lookups when their quotient is greater than 1.
=B12*E13*R24*MAX(INDEX(AK:AK,MATCH($A3,M:M,0))/INDEX(AL:AL,MATCH($A4,M:M,0)), 1)

Excel - allocate weight based on text

I have an risk control assessment where some controls are key and hold greater weight than non key controls.
Key vaule (1-4)
Y 4
Y 3
N 2
N 2
I want the keys with a "Y" to be summed at a weight of 70% and the non-keys with an "N" to be summed at a weight of 30%.
If we add the column we get 11. However, I want the 7 (4+3) to be multiplied by 70% and the 4 (2+2) be multiplied by 30%.
There may be 4 rows or 40. There generally are only 1 or 2 key controls ("Y"), but, if there are 40 rows or controls, there may be up to 5 "Y"s.
Any thoughts?
A simple way to do what I think you want would be to create a third column that had formulas like this one: =IF(A1="Y",B1*0.7,B1*0.3). Then, you could use the SUM function to add up all of the results. See the cells with formulas below.
Key Value Weighted Value
Y 1 =IF(A2="Y",B2*0.7,B2*0.3)
N 2 =IF(A3="Y",B3*0.7,B3*0.3)
N 3 =IF(A4="Y",B4*0.7,B4*0.3)
Y 4 =IF(A5="Y",B5*0.7,B5*0.3)
=SUM(C2:C5)
Here would be the result...
Key Value Weighted Value
Y 1 0.7
N 2 0.6
N 3 0.9
Y 4 2.8
5
As you can seen from #TimWilliams' comment, there is some uncertainty about your requirement but if it is weighting factors then the following formula might suit:
=IF(A2="Y",C$1*SUM(B:B)*B2/SUMIF(A:A,"=Y",B:B)/SUM(B:B),(1-C$1)*SUM(B:B)*B2/SUMIF(A:A,"=n",B:B)/SUM(B:B))
copied down to suit and assuming a layout as shown:

Compare percentage value against decimal Excel

I am a bit stumped with this issue, I was wondering if anyone could suggest a solution. In Excel I have a table which looks like this:
1 2 3 4 5 Result Score
80% 85% 90% 95% 100% 92.5% 3.50
What I am trying to calculate is that proportional score, based on where the result falls within the preset decimal 1-5 score.
Thanks.
In your case where each increment is 5% you could use a simple calculation like
=MAX(0,F2-75%)*20
[where result is in F2]
....but assuming that you want to interpolate the score given potentially less linear values in your table try this formula where your table is in A1:E2
=LOOKUP(F2,A2:E2,A1:E1+(F2-A2:D2)*(B1:E1-A1:D1)/(B2:E2-A2:D2))
for linear interpolation this would be general formula, just name the ranges or replace with cell references:
= (perc - minperc) / (maxperc - minperc) * (maxscore - minscore) + minscore

Resources