Changing Colours on Worksheet
Following code will select ALL cells with yellow background...
You can now choose to do some other thing with the range instead of
selection or after selection
Sub color_find()
Dim cell, rng As Range
For Each cell In ActiveSheet.UsedRange
If cell.Interior.ColorIndex = 6 Then
If rng Is Nothing Then
Set rng = Range(cell.Address)
Else
Set rng = Union(Range(rng.Address), Range(cell.Address))
End If
End If
Next cell
rng.Select
End Sub
Jahson wrote:
Hi
I have a worksheet which is colour coded, Is it possible
to change all cells that are highlighter say yellow to
blue?
Thanks
|