Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use VBA to shade every 3 rows (banding)
I've seen ways to do this with conditional formatting (http://
www.cpearson.com/excel/banding.aspx), but I'd like to do it with VBA. How do I modify the below macro to shade alternate groups of 3 rows? Instead of every other row... Sub HighlightAltRows() Selection.Interior.ColorIndex = xlNone Dim Counter As Integer For Counter = 1 To Selection.Rows.Count If Counter Mod 2 = 0 Then Selection.Rows(Counter).Interior.ColorIndex = 54 End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shade even rows in a sheet | Excel Discussion (Misc queries) | |||
how to shade every other 5 rows | New Users to Excel | |||
shade hidden rows | Excel Discussion (Misc queries) | |||
shade rows | Excel Discussion (Misc queries) | |||
shade rows | Excel Discussion (Misc queries) |