Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
not sure if I read this properly, but would it be more
efficent to use sumif's and countif's (ie. the worksheet functions) -----Original Message----- 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counter | Excel Discussion (Misc queries) | |||
Day counter | Excel Discussion (Misc queries) | |||
Counter variable and a multiplier | Excel Discussion (Misc queries) | |||
counter | Excel Discussion (Misc queries) | |||
Counter | Excel Discussion (Misc queries) |