Link to home
Start Free TrialLog in
Avatar of morinia
moriniaFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is the area to be shaded a data list?

Convert to a table and the default format is alternate row shading.