How to loop through range of cells in Excel VBA?
Posted on 2008-09-30
I am trying to use a For LOOP to alternate throught the range of cells in Excell but do not quite remember the syntex. Here is what i am trying to do:
On row 1 select first three cells (for example: A1, B1, C1) and do something with it.
Then next loop around should select next three cells on Row 1 (example: D1, E1, F1) and do somthing with it
Then next loop around should select next three cells on Row 1 (for example: G1, H1, I1) and do something with it.
I sort of started this but do not quite know how to alternate through Range("?1:?1")
For K = 1 To 30
ActiveCell.FormulaR1C1 = "Question" & K
In the place of questions mark not sure what to put...
Any help is appreciated.