WaterSprite
Technical User
ThisRow = Cells(65536,33).End(xlup).Row
Cells(ThisRow, 33).Activate
For i = ThisRow to 9 Step -1
if Cells(i, "AG") > 1 Then Cells(i, "AJ").value = "=(Cells(i, AG)-Cells(i,AH)))"
Next i
End sub
This works down to the if statement. I looked in the FAQ's and also searched under If Then, but nothing came up that gave me a clue as to what I did wrong.
The second line of code that activates the cell is probably not needed in this instant, but I use CurrentRegion a lot and choosing the active cell helps me with that.
Thanks for the help.
Cells(ThisRow, 33).Activate
For i = ThisRow to 9 Step -1
if Cells(i, "AG") > 1 Then Cells(i, "AJ").value = "=(Cells(i, AG)-Cells(i,AH)))"
Next i
End sub
This works down to the if statement. I looked in the FAQ's and also searched under If Then, but nothing came up that gave me a clue as to what I did wrong.
The second line of code that activates the cell is probably not needed in this instant, but I use CurrentRegion a lot and choosing the active cell helps me with that.
Thanks for the help.