Conditional Formatting for Date

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

Is there a way to apply conditional formatting if a date
is less than 30 days from today's date? Ex. to highlight
something that will be expiring within 30 days. Thanks.
 
Kathy napsal(a):
Is there a way to apply conditional formatting if a date
is less than 30 days from today's date? Ex. to highlight
something that will be expiring within 30 days. Thanks.
Hi Kathy,

you should to type a function TODAY - "=TODAY()" in any separated cell
(for example A1). In cell A2 you have date of some goods which has a
exp. date on 03.11.2003, so make a formula in C1: B1 - A1 and the result
is 31 days. Because in A1 you have a function TODAY, tomorrow will be
the result 30 days. You can use conditional Formatting on it. Try this,
it should help.

Marian
 
Marian,

no need really to use an extra cell, you can use the today
function in the conditional formatting, assume A1 is the
date that should change format if less than 30 days from
today's date

use formula is and

=A1-TODAY()<30

now click the format button and for instance change the
font colour to red. Click OK twice..

regards,

Peo Sjoblom
 
Thanks. I did get that far. Now how can I apply
conditional formatting to the expiration date (in your
example cell B1), not the number of days to go (30). You
can't base conditional formatting for B1 on a result in
C1, can you?
 
Back
Top