Find character in entire workbook and format color
Sub AAAB()
Dim oFound As Range
Dim firstaddress As String
For Each sh In Worksheets
firstaddress = ""
Set oFound = sh.Cells.Find("*~**", _
LookIn:=xlValues, LookAt:=xlWhole)
If Not oFound Is Nothing Then
firstaddress = oFound.Address
Do
oFound.Font.ColorIndex = 43
oFound.Font.Bold = True
Set oFound = sh.Cells.FindNext(oFound)
Loop While oFound.Address < firstaddress
End If
Next
End Sub
--
Regards,
Tom Ogilvy
"CST" wrote in message
om...
Hi All,
Is there an efficient way via VBA to find cell values w/ a certain
character and change the color / font properties? For example, I want
to find all cells that have an "*" in it and change the color to a
bolded green. I tried doing a record macro, but didn't have any luck.
Sorry for asking such a noob question.
TIA.
|