S
steveski
Using VBA, I want to go row-by-row and get the values from certain cell
in each row so I can run some tests on them, then put the result of th
tests back in certain cells.
This is how I am set up so far, can you help me with my questions i
CAPS below?:
Sub Example()
Dim i As Long, c1 As Long, c2 As Long
c1 = 0
c2 = 0
For i = 1 To 120 (HOW DO I MAKE THIS DYNAMIC TO INCLUDE NEW ROW
AS THEY ARE ADDED?)
If Cells(i, 2).Value Then 'start flag is true (HOW DO I MAK
VBA GO TO A DIFFERENT WORKSHEET WITH THE Cells(I,2).Value STATEMENT?
If Cells(i, 1).Value = "E" Then
c1 = c1 + 1
ElseIf Cells(i, 1).Value = "O" Then
c2 = c2 + 1
End If
End If
Next i
Range("D1") = c1
Range("D2") = c2
End Su
in each row so I can run some tests on them, then put the result of th
tests back in certain cells.
This is how I am set up so far, can you help me with my questions i
CAPS below?:
Sub Example()
Dim i As Long, c1 As Long, c2 As Long
c1 = 0
c2 = 0
For i = 1 To 120 (HOW DO I MAKE THIS DYNAMIC TO INCLUDE NEW ROW
AS THEY ARE ADDED?)
If Cells(i, 2).Value Then 'start flag is true (HOW DO I MAK
VBA GO TO A DIFFERENT WORKSHEET WITH THE Cells(I,2).Value STATEMENT?
If Cells(i, 1).Value = "E" Then
c1 = c1 + 1
ElseIf Cells(i, 1).Value = "O" Then
c2 = c2 + 1
End If
End If
Next i
Range("D1") = c1
Range("D2") = c2
End Su