How do I use conditional formatting?

Microsoft Office word 2007 - upgrade
January 24, 2011 at 19:41:55
Specs: N/A
I have three different criteria in my Excel 2007 worksheet that I need compared use two columns of data. If any of the conditions are met I need to color the row yellow. For example:
If A2>30 color the row yellow or
If A2>15 and B2>62 color the row yellow or
If A2>5 and B2>60 color the row yellow otherwise leave the cell without formatting.

The conditional formatting that I used in Excel 2003 is not working and I am not sure what to do. Do I need to have each condition as a separate rule or if I can include all three in a string, how do I connect them?


See More: How do I use conditional formatting?

Report •

#1
January 24, 2011 at 20:06:20
I used this formula in Excel 2010 and it seemed to work fine:

=OR(A2>30,AND(A2>15,B2>62),AND(A2>5,B2>60))

However, I have a question.

Maybe my brain is just fried from a long day, but what is the point of the 2nd condition, A2>15 and B2>62?

When could A2>15 and B2>62 be TRUE, and A2>5 and B2>60 not be TRUE?

Doesn't the 3rd condition cover the 2nd one also?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
January 26, 2011 at 12:30:22
Thank you! I had a formatting problem in the spreadsheet and when I fixed that it worked.

Report •

#3
January 26, 2011 at 13:04:15
I'm glad you got it working, but I'm still confused by your 2nd condition.

Why do you need that, considering that the 3rd condition covers every instance where the 2nd condition would be TRUE?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
January 26, 2011 at 13:10:19
It actually should have read:

IIf A2>30 color the row yellow or
If A2>15 and B2>60 color the row yellow or
If A2>5 and B2>62 color the row yellow otherwise leave the cell without formatting.

With the B2> 60 for the second condition and the B2>62 for the third condition. I am comparing ages and years of service for retirement eligibility.


Report •

Ask Question