Adding scores and need average

T

Tom Tripicchio

Mr. B set this up for me, but now I need the average of these 15 combo
boxes.

The formula below adds up the combo boxes for me quite nicely, but now I
would like the text box to return the average score of the 15 combo boxes.

Thanks, Tom

Me.Text144 = Val(Me.Q1)
Me.Text144 = Val(Me.Text144) + Val(Me.Q2)
Me.Text144 = Val(Me.Text144) + Val(Me.Q3)
Me.Text144 = Val(Me.Text144) + Val(Me.Q4)
Me.Text144 = Val(Me.Text144) + Val(Me.Q5)
Me.Text144 = Val(Me.Text144) + Val(Me.Q6)
Me.Text144 = Val(Me.Text144) + Val(Me.Q7)
Me.Text144 = Val(Me.Text144) + Val(Me.Q8)
Me.Text144 = Val(Me.Text144) + Val(Me.Q9)
Me.Text144 = Val(Me.Text144) + Val(Me.Q10)
Me.Text144 = Val(Me.Text144) + Val(Me.Q11)
Me.Text144 = Val(Me.Text144) + Val(Me.Q12)
Me.Text144 = Val(Me.Text144) + Val(Me.Q13)
Me.Text144 = Val(Me.Text144) + Val(Me.Q14)
Me.Text144 = Val(Me.Text144) + Val(Me.Q15)
 
S

SteveS

You could try

Me.Text144 = Me.Text144/15



Another way...

(this should be one line)



Me.Text144 = (Val(Me.Q1) + Val(Me.Q2) + Val(Me.Q3) + Val(Me.Q4) + Val(Me.Q5)
+ Val(Me.Q6) + Val(Me.Q7) + Val(Me.Q8) + Val(Me.Q9) + Val(Me.Q10) +
Val(Me.Q11) + Val(Me.Q12) + Val(Me.Q12) + Val(Me.Q14) + Val(Me.Q14))/15





HTH
 
K

Kgwill85

You could try

Me.Text144 = Me.Text144/15

Another way...

(this should be one line)

Me.Text144 = (Val(Me.Q1) + Val(Me.Q2) + Val(Me.Q3) + Val(Me.Q4) + Val(Me.Q5)
+ Val(Me.Q6) + Val(Me.Q7) + Val(Me.Q8) + Val(Me.Q9) + Val(Me.Q10) +
Val(Me.Q11) + Val(Me.Q12) + Val(Me.Q12) + Val(Me.Q14) + Val(Me.Q14))/15

HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)








- Show quoted text -

^^^^^ The second formula should work perfectly. I have a form with a
similiar formula and it's flawless.
 
Top