A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using wildcards with logical (IF, AND) conditional formatting



 
 
Thread Tools Display Modes
  #1  
Old February 5th, 2010, 10:11 PM posted to microsoft.public.excel.worksheet.functions
olddog
external usenet poster
 
Posts: 2
Default Using wildcards with logical (IF, AND) conditional formatting

I have two columns: A & B. Assume A contains a combinaton of numbers and
letters (e.g. 13.00.10i.022) and is formated as "General." Column B is a
whole number between 1 and 3. I would like to create a Conditional Format
formula that says "IF B=1 AND A does NOT begin with the number "12", then
color that ROW red. Continuing, "IF B=1 AND A DOES begin with the number
"12," then do nothing (no color format). How do I do this?

Thanks !
  #2  
Old February 5th, 2010, 10:23 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Using wildcards with logical (IF, AND) conditional formatting

CFFormula is =AND(B1=1,LEFT(A1,2)"12")

The no color part takes care of itself.


Gord Dibben MS Excel MVP

On Fri, 5 Feb 2010 14:11:02 -0800, olddog
wrote:

I have two columns: A & B. Assume A contains a combinaton of numbers and
letters (e.g. 13.00.10i.022) and is formated as "General." Column B is a
whole number between 1 and 3. I would like to create a Conditional Format
formula that says "IF B=1 AND A does NOT begin with the number "12", then
color that ROW red. Continuing, "IF B=1 AND A DOES begin with the number
"12," then do nothing (no color format). How do I do this?

Thanks !


  #3  
Old February 5th, 2010, 10:28 PM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default Using wildcards with logical (IF, AND) conditional formatting

Hi,

Suppose your data starts in A1 and by row you mean A1:B1, not A1:XDF1:


In 2003:
1. Select the cells you want to format
2. Choose Format, Conditional Formatting
3. Choose Formula is from the first drop down
4. In the second box enter the formula:
=AND($B1=1,LEFT($A1,2)"12")
5. Click the Format button
6. Choose a color on the Patterns tab (or any available option)
7. Click OK twice.

In 2007:
1. Highlight all the cells on the rows you want formatted
2. Choose Home, Conditional Formatting, New Rule
3. Choose Use a formula to determine which cell to format
4. In the Format values where this formula is true enter the following
formula:
=AND($B1=1,LEFT($A1,2)"12")
5. Click the Format button and choose a format.
6. Click OK twice



--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"olddog" wrote:

I have two columns: A & B. Assume A contains a combinaton of numbers and
letters (e.g. 13.00.10i.022) and is formated as "General." Column B is a
whole number between 1 and 3. I would like to create a Conditional Format
formula that says "IF B=1 AND A does NOT begin with the number "12", then
color that ROW red. Continuing, "IF B=1 AND A DOES begin with the number
"12," then do nothing (no color format). How do I do this?

Thanks !

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.