Selecting cells by colour
Hey Gary, thanks a lot. It seems to work. Though, I will do some more testing
in order to be more sure.
"Gary''s Student" wrote:
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
|