Selecting cells by colour
Sub sufgreen()
Set rr = Nothing
For Each r In ActiveSheet.UsedRange
If r.Interior.ColorIndex = 10 Then
If rr Is Nothing Then
Set rr = r
Else
Set rr = Union(rr, r)
End If
End If
Next
If Not rr Is Nothing Then
rr.Select
End If
End Sub
--
Gary''s Student - gsnu200733
|