Archive of Mr Excel Message Board


Back to Forms in Excel VBA archive index
Back to archive home

Can I use conditional formatting for this:

Posted by Paul on October 22, 2001 8:24 AM
Can I use conditional formatting for this: The info in my cells will be 1# or 1#/1Letter or 1#1letter/1#1letter, numbers are not always the same, example 8, 8/L, 4L/4S can I use a wild card like this if the cell is **/** format the cell as Arial 7 point. I am using excel ’97. Thanks Paul

Re: Can I use conditional formatting for this:

Posted by Martin Peters on October 23, 2001 7:38 AM


If you only want to format the cell when the third character is "/" then you could put this in the FormulaIs box :-
MID(A1,3,1)="/"


Should be =MID(A1,3,1)="/"

Posted by Martin Peters on October 23, 2001 7:40 AM


Re: Should be =MID(A1,3,1)="/"

Posted by Juan Pablo on October 23, 2001 7:52 AM
How about using Search or Find ?

Try, in conditional formatting formula

=ISNUMBER(SEARCH("/",A1))

And format as Arial 7

Juan Pablo


But ....

Posted by Martin Peters on October 23, 2001 8:08 AM
But that depends upon whether all cells containing "/" need to be formatted, or only cells containing 5 characters. How about using Search or Find ? Try, in conditional formatting formula =ISNUMBER(SEARCH("/",A1)) And format as Arial 7 Juan Pablo


Re: But ....

Posted by Juan Pablo on October 23, 2001 8:42 AM
If you have in A1:A3 the sample data he provided:
{8;8/L;4L/4S} then if you select A1:A3, goto Conditional Formatting, put the formula [=ISNUMBER(SEARCH("/",A1))], and select, for example, a yellow background pattern, Cells A2 and A3 will become highlited, it doesn't matter how "long" the strings are... as long as there's a "/" in there...

Juan Pablo But that depends upon whether all cells containing "/" need to be formatted, or only cells containing 5 characters. : How about using Search or Find ? : Try, in conditional formatting formula : =ISNUMBER(SEARCH("/",A1)) : And format as Arial 7 : Juan Pablo :


Re: But ....

Posted by Martin Peters on October 23, 2001 1:03 PM
I guess the poster will use whatever one fits his needs.
I interpreted his requirement to be to format only cells containing 5 characters (he said "if the cell is **/** ") If you have in A1:A3 the sample data he provided: {8;8/L;4L/4S} then if you select A1:A3, goto Conditional Formatting, put the formula [=ISNUMBER(SEARCH("/",A1))], and select, for example, a yellow background pattern, Cells A2 and A3 will become highlited, it doesn't matter how "long" the strings are... as long as there's a "/" in there... Juan Pablo : But that depends upon whether all cells containing "/" need to be formatted, or only cells containing 5 characters.


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.