variable counter/total

  • Thread starter Thread starter Carole
  • Start date Start date
C

Carole

I'm trying to count entries and amounts in 25 columns,
and want to pace the results in a "tot" work area: tot1 -
tot25. How can I use the counter as a variable?
j = 1
i = 1
Do Until j = 25
Do Until Cells(i, 2) = ""
"tot" & cells(j) = "tot" & cells(j) + 1
If Cells(i, 2) > 119 Then
pt1 = pt1 + 2
Else
If Cells(i, 2) > 79 Then
pt1 = pt1 + 1
Else
pt1 = pt1 + 0
End If
pt1 = pt1 + 0
End If
i = i + 1
Loop
j = j + 1
Loop

End Sub
 
not sure if I read this properly, but would it be more
efficent to use sumif's and countif's (ie. the worksheet
functions)
 
Back
Top