Need to start at "A" cell 5 rows down and loop 30 times what code would help me to do this and I need the rows to be shaded.
Printable View
Need to start at "A" cell 5 rows down and loop 30 times what code would help me to do this and I need the rows to be shaded.
Starting in cell A5 is easy...
But what do you want to do in your loop? Can you be more specific?Code:Range("A5").Select
If you mean you need to select column A, rows 5 through 35, then you can do this...
Or if you just need to use a loop to select them, then try this:Code:Range("A5:A35").Select
P.S. If you get stuck with VBA, the easiest way to figure out what to do is record a macro of what you want to do, then look at the code the macro generated. Then edit this to what you want.Code:Dim intRow As Integer
For intRow = 5 To 35
Range("A5:A" & intRow).Select
Next ' intRow