View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Date Conditional Formatting

Excel Dumbo expressed precisely :
Hello,

I need a formula to help in doing conditional formatting for date

say for Example- Date given is 25/02/2012
When this date has only one month left to cross one year, that is,if
today's date is 25/01/2013, it should turn yellow and when this date
crosses one year,that is, if today's date is 25/02/2013, it should turn
red.

Thanks


That will require setting 2 conditions. I don't see any point in
setting a condition if the date is less than 1 year, and so I suggest
setting CF to handle only if the date crosses one year.

If you need a visual indicator )other than the default fill color) that
the date hasn't crossed yet then you can manually set fill color for
the range.

If you want to *flag* a date that's about to cross a year (last day)
then set its CF condition 1st, set the other one last...


For flagging last day before crossing (yellow)
=($A1+365)=TODAY()

For crossing the year (red)
=(TODAY()-366)=$A1

...where the number of days (365/366) account for 2012 being a leap.
Adjust this to your liking.<g

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion