a standard loop in Excel VBA goes like this:
dim i as integer for i = 1 to 100 <do program> next end sub
Now, my question is: how can I use the counter, i, as an argument in the program?
dim i as integer for i = 1 to 100 If Range("Ci") = 0 Then Rows("i:i").Select Rows.Delete next end sub
You should be able to do something like this:
dim i as integer for i = 1 to 100 If Range("C" & i) = 0 Then Rows(i & ":" & i).Select Rows.Delete end if next end sub
& is the concatenation operator which is used to add a string onto another string.
i is obviously a number in the above example, but VBScript is smart enough to know what you’re doing and, for example, just stick
"C" and the current value of