Hey all,
I'm trying to use the cells command for a computation but it's not working when I try to use the counting variable by itself as the row index.
If I change it to Cells(1 + k, 36) it works although the answers are incorrect that it gives. Is their a different way I can write this?
Here is the loop:
I'm trying to use the cells command for a computation but it's not working when I try to use the counting variable by itself as the row index.
Code:
Month(Cells(k, 36)) < ETCMonth
Here is the loop:
Code:
Dim k As Long, LR As Long
With Sheets("Ready for Submission")
LR = .Range("Z" & Rows.Count).End(xlUp).Row
For k = 1 To LR
If Range("Z" & k).Value = "CLOSED" And Month(Cells(k, 36)) < ETCMonth Then .Rows(k).Cut Destination:=Sheets("Closed Accounts").Range("A" & Rows.Count).End(xlUp).Offset(1)