If you want to hide and unhide rows based on colour you can use below code.
Excel 2007 provide option of filter by colour but below 2007 version you can not.
Sub Mtest()
Dim c As Range
On Error Resume Next
With ActiveSheet
For Each c In .Range("A1:A100")
If c.Interior.ColorIndex <> 6 Then c.EntireRow.Hidden = Not c.EntireRow.Hidden
Next c
End With
On Error GoTo 0
End Sub
No comments:
Post a Comment