View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] PeterFauler@gmail.com is offline
external usenet poster
 
Posts: 4
Default I have a created a variable with a loop, how do I find average ofvariable most efficiently?

I want to take the average of score with displaying any numbers in
excel

Sub rndgenandaver()

Dim score, t, lastt
t = 1
lastt = 10
ReDim score(lastt)

t = 1
For t = 1 To lastt
If t 0 Then score(t) = Rnd()
Next t

End Sub