conditional formatting or VB

B

Brian

I have a spreadsheet with text, dates and numbers. I want to change the
color of the cell if a specific word is present within the cell. For
example. Mr Smith's Retirement. Conditional formatting only works if the
only word in the cell is exactly retirement. I want the cell to turn green
if the word retirement is present. Need about 4-5 differnt colors for
specific words.

thanks
 
D

Don Guillett

4-5 different colors indicates a need for a macro. Have a look in the vba
help index for SELECT CASE.
 
D

Dave Peterson

If you're using xl2007, you get more than the 3 conditional formats that you get
in xl2003 (and before).

And you can use:
formula is: =isnumber(search("retirement",A1))
or
formula is: =isnumber(find("retirement",A1))
or
formula is: =countif(a1,"*retirement*")>0
(where A1 is the activecell)

(=search() and =countif() are not case sensitive. =Find() is case sensitive.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top