Conditional Formatting Using If Statement On Opening Of Workbook
"Bill Foley" wrote in message
...
Let's say A15 has a date of 10/1/2004 (Oct 1, 2004). I need it to be
shaded
when it is within 1 month of 10/1/2005 (Oct 1, 2005). Since it is already
past that date, it still needs to be shaded until a new date is entered
when
re-training is done. Since there any number of rows and dates, I need it
to
look at each cell in the range and shade it if it is older than 11 months
from today's date.
My reading of the periodicity made me wonder if you would put a date in, and
then you wanted it highlighted every said period after that date. The fact
that you are want it to saty shaded until it expires and will then update
the date makes it significantly easier.
You can use the technique given, but still use a number of months as you
originally asked with a formula of
=DATE(YEAR(TODAY()),MONTH(TODAY())-A$1000+1,DAY(TODAY()))
"=TODAY()-$A$1000" condition, blank cells are also shaded. I know how to
do
a conditional formula to only run a formula if a cell has a value in it,
but
wasn't sure if that could be done with conditional formatting also.
This can be handled, albeit with a more complex formula. To do this, and
apply to all cells and all sheets
On the first sheet, select all the cells that will have dates on one
worksheet (assuming starting at A2)
Group from that sheet to the last (hold shift and click the final sheet tab)
FormatConditional Formatting
Change conditions 1 to Formula Is
Add this formula
=AND(A2<"",A2<DATE(YEAR(TODAY()),MONTH(TODAY())-A$10+1,DAY(TODAY())))
Add the format
OK
|