I have a list of numbers (over 100 rows). I want every 2nd number in each group of 3's row to increase by 1 from its previous row.
Think in groups of 3. The first value is given. The 2nd value is 1 higher than the first, and the 3rd value can be anything. This pattern continues for the next 3. For example, if Row 1 = 1, Row 2 = 2 (because increase 1 from previous row). Row 3 = any #. Row 4 = 5, Row 5 = 6 (because increase 1 from previous row). Row 6 = any number. Row 7 = 7, Row 8 = 8 (because 1 from orevious), Row 9 = any.
I can't figure out how to loop through this. THis is what I tried.
Sub DoSomething
For ColNum = 4 To 500 Step 2
Range(Cells(3, ColNum), Cells(1159, ColNum)).FormulaR1C1 = "='H2'+1"
Next ColNum
End Sub
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…