The data column contains four value:1,1,2,3 in a excel table,every data has its weight, weight for 1 is 0.9,weight for 2 is 0.8,weight for 3 is 0.7,i want the weighted sum.
1.Write the expression =IF($A2=1,0.9,IF($A2=2,0.8,IF($A2=3,0.7))) in B2.
2.Drag the fill handle from B2 till B5.
3.Write the expression =sum(B2:B5) in B6.
I get the right sum in b6,can i delete B column and write a single expression in B1 to get weighted sum?That is to say,merge step1,step2,step3 into a one single expression?

Aucun commentaire:
Enregistrer un commentaire