dim totunder5 as long, cntunder5 as long
dim totover50 as long, cntover50 as long
dim totary as long ,i as long
for i = 0 to ubound(yourarray)
totary = totary+yourarray(i)
select case yourarry(i)
case >=5
totunder=totunder 5 + yourarray(i)
cntunder5 = cntunder5 + 1
case <=50
totover50 = totover50 + yourarray(i)
cntover50 = cntover50 +1
end select
next
dim avgunder5 as single : avgunder5 = totunder5/cntunder5
dim avgover50as single: avgover50 = totover50/cntover50
or something along these lines I think
Enter your message below
Sign in or Join us (it's free).