morinia
asked on
Repeating shading every other row for 160 rows
Experts,
I would like to shade every other row columns E through J in VBA .
This codes does it, but I am a little rusty how to do a loop in VBA Can someone tell me the code to loop this every other row.
row 7 row 9 row 11 etc.
'
ActiveSheet.Unprotect
Range("D5:J5").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -4.99893185216834E-02
.PatternTintAndShade = 0
End With
I would like to shade every other row columns E through J in VBA .
This codes does it, but I am a little rusty how to do a loop in VBA Can someone tell me the code to loop this every other row.
row 7 row 9 row 11 etc.
'
ActiveSheet.Unprotect
Range("D5:J5").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -4.99893185216834E-02
.PatternTintAndShade = 0
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Convert to a table and the default format is alternate row shading.