Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting

Status
Not open for further replies.

waynerenaud

IS-IT--Management
May 21, 2003
80
AU
Hopefully this is a quick and easy question.
Using conditional formatting, how do you use wildcards.
ie: if i want to apply a format if cell A1 contains "pen" i can use =$A1="pen" which works if the cell content is "pen" but wont work if the content is "open" or "pentagon" i have tried using wildcards
ie: =$A1="*pen*" and also tried =$A1=*"pen"* but they dont work. There must be a way of using wildcards in conditional formats. Please Help.
 
Using the example you gave, lets say the word pentagon is in cell A1.

Instead of using the default
Code:
Cell Value Is
, use
Code:
Formula Is
and use the FIND function for the conditional format formula.
Code:
=FIND("pen",A1)

This will format the cell the way you want for pentagon, but not Pentagon
If you want the condition to be case insensitive use the SEARCH function instead:
Code:
=SEARCH("pen",A1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top