ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find word in a cell then change cell format (https://www.excelbanter.com/excel-programming/329880-find-word-cell-then-change-cell-format.html)

[email protected]

find word in a cell then change cell format
 
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


[email protected]

find word in a cell then change cell format
 

If InStr(1, Range("A1").Value, "am") 0 Then
Range("E3").Interior.ColorIndex = 1
End If

Try this.


Jim May

find word in a cell then change cell format
 
Use Conditional Formatting using this formula
after selecting Formula is:

=ISNUMBER(FIND("am",A1,1))

Color accordingly

HTH


wrote in message
oups.com...
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





All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com