PDA

View Full Version : Conditional Formatting



tennis55
2011-05-15, 03:35 AM
I'm trying to create conditional formatting that will do the following:
A3= today's date I10:


Anything due before today's date= Red
Due within the next week: Anything due within 5 business days of A3= Yellow
Due in the future: Anything due beyond 5 business days of A3= Green

I've created the following conditional formatting rules:
=IF($A$3>WORKDAY(I10,2,$M$5:$M$6),TRUE,FALSE) [will be red]
=IF($A$3>=WORKDAY(I10,2,$M$5:$M$7),TRUE,FALSE) [will be yellow]
=IF($A$3<=WORKDAY(I10,6,$M$5:$M$6),TRUE,FALSE) [will be green]

I also need a way to count the amount of reds, yellows, and greens, without using a macro. I have used this formula, but it's not working properly: =IF(J10="","",IF(J10="Complete",4,IF(J10<$A$3,1,IF(J10=$A$3+(WORKDAY(I10,6,$M$5:$M$6)),3))))) Upon receipt, I will give the file.

Any help?

Simon Lloyd
2011-05-15, 05:15 AM
Tons of help and it's all found here http://www.xldynamic.com/source/xld.html this is Bob Phillips site, you'll finde everything you need there :)

Bob Phillips
2011-05-15, 09:06 AM
As Simon says, there is plenty there, even one section on traffic lighting due dates, http://www.xldynamic.com/source/xld.CF.html#due

tennis55
2011-05-15, 06:10 PM
The site doesn't specify how to include only workdays in the function. I want to only include workdays and holidays.

Also it doesn't specify how to break out the days. For example:

Anything due before today's date= Red
Due within the next week: Anything due within 5 business days of A3= Yellow
Due in the future: Anything due beyond 5 business days of A3= Green

How do I do that?

Roger Govier
2011-05-16, 03:49 PM
Hi

Just substitute your formulae for the ones Bob uses in his example.
You don't need the whole of your formulae however, miss out the IF statements
=$A$3>WORKDAY(I10,2,$M$5:$M$6) [will be red]
=$A$3>=WORKDAY(I10,2,$M$5:$M$7) [will be yellow]
=$A$3<=WORKDAY(I10,6,$M$5:$M$6) [will be green]

The formulae themselves will return a True or False which the CF will use to determine whether to colour the cell.