Thread: Conditional Formatting & wild cards (2003 sp2)

1. Conditional Formatting & wild cards (2003 sp2)

Dear Loungers,

Is it possible to use wild card in conditional formatting I can't find anything that says how or a way to make it work so maybe not but does someone know for sure?

What I am trying to do logically is something like make it red if like "y" plus anything else e.g. y1, y2, yx

thanks............. liz

2. Re: Conditional Formatting & wild cards (2003 sp2)

Hi Liz
For cell A1, set the Condition to "Formula is" then
=LEFT(A1,1)="y"
The conditional formatting can be copied to other cells using the Paste Special feature.

3. Re: Conditional Formatting & wild cards (2003 sp2)

Don,

Thanks that will work well in this case. As a general question do you think wild cards are usable in condotion formatting?

liz

4. Re: Conditional Formatting & wild cards (2003 sp2)

I don't think you can use wildcards, but you can use Formula Is in combination with a formula to specify any kind of condition you like. For example, if you want to highlight or otherwise format a cell differently if its value contains a y in any position, you can use the formula
<code>
=NOT(ISERROR(SEARCH("y",A1)))
</code>
in Conditional Formatting.

5. Re: Conditional Formatting & wild cards (2003 sp2)

Just to expand and clarify the various posts and the "wildcard"
Don's
<pre>=LEFT(A1,1)="y"</pre>

is equivalent to "y*" And
<pre>=right(A1,1)="y"</pre>

is equivalent to "*y"

Hans' formula:
<pre>=NOT(ISERROR(SEARCH("y",A1)))</pre>

is equivalent to "*y*"

Of course you can replace "y" with a different string eg "abc" to make the equivalent "*abc*" (with the left/right the number must be changed to the lenght of the string (3 in the case of "abc"

Steve

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•