I want to find some words in cells
and then change the color of cell if find.
eg. a cell contain "hello I am moto"
if macro find "am" then change the cell color
anybody know how to write the macro ?
Thanks
I want to find some words in cells
and then change the color of cell if find.
eg. a cell contain "hello I am moto"
if macro find "am" then change the cell color
anybody know how to write the macro ?
Thanks
Try:
Sub FindAndFormat()
Set rng = ActiveSheet.UsedRange
For Each c In rng
If c.Value Like "*Cowboy*" Then
c.font.color=vbblue
End If
Next
This will format blue all cells containing only "Cowboy" or any expression including "Cowboy".
david
If InStr(1, Range("A1").Value, "am") > 0 Then
Range("E3").Interior.ColorIndex = 1
End If
Try this.
Use Conditional Formatting using this formula
after selecting Formula is:
=ISNUMBER(FIND("am",A1,1))
Color accordingly
HTH
<[email protected]> wrote in message
news:[email protected]...
> I want to find some words in cells
>
> and then change the color of cell if find.
>
> eg. a cell contain "hello I am moto"
> if macro find "am" then change the cell color
>
> anybody know how to write the macro ?
> Thanks
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks