View Single Post
  #10   Report Post  
Bill Foley
 
Posts: n/a
Default Conditional Formatting Using If Statement On Opening Of Workbook

I tried it but all the blank cells in the range I applied the conditional
formatting got shaded as well. I will continue to look into it.

THANKS!

--
Bill Foley
www.pttinc.com
Microsoft PowerPoint MVP
"Bob Phillips" wrote in message
...
Bill,

That last formula I gave you, with the way to implement it, should do just
that.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bill Foley" wrote in message
...
Sure enough worked as well. THANKS!

One last thing - Any idea how to skip blank cells in a range (or have an

IF
statement that only does the conditional formatting if the cell has a

date
in it)?

--
Bill Foley
www.pttinc.com
Microsoft PowerPoint MVP
"Bob Phillips" wrote in message
...

"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