Thread
:
Alternate row coloring
View Single Post
#
8
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Alternate row coloring
You are correct. I thought I had tested.
Glad Myrna's worked for you.
--
Don Guillett
SalesAid Software
"David Turner" wrote in message
...
Don Guillett wrote
I thought I answered this a day or two ago?
Sub colorvisible()
x = Range("a" & Rows.Count).End(xlUp)
Rows("1:" & x).Interior.ColorIndex = xlNone
For i = 2 To x Step 2
Cells(i, 1).SpecialCells(xlCellTypeVisible) _
.EntireRow.Interior.ColorIndex = 6
Next i
End Sub
Indeed you did. And I replied with the observation that without changing
line 1 to x = Range("a" & Rows.Count).End(xlUp).Row, it bombed with a
'Type
mismatch error. Even with the modification, when called after setting
AutoFilter, my whole sheet turns yellow. Works ok if I don't AutoFilter
any
thing.
--
David
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]