Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default conditional formats for cells

David

But of course it doesn't deal with the subtleties of leap years.


We could deal with the subtleties of leap year (at least for the next 93
years) with the addition of
+(MOD(YEAR(TODAY()),4)=0) to the 365 in each case.

Your formula with the use of ABS() quite rightly deals with dates that
are within a year of Today (+ or -) but taking Epinn's point where I
think he is suggesting the OP might only want days up to 1 year ahead of
Today, then maybe

=AND($C1TODAY(),($C1-TODAY())<=365+(MOD(YEAR(TODAY()),4)=0)) for the
green
=AND($C1TODAY(),($C1-TODAY())365+(MOD(YEAR(TODAY()),4)=0)) for the
red.

which would leave any cells with dates prior to Today at the default
colouring.
--
Regards

Roger Govier


"David Biddulph" wrote in message
...
Formula is =(ABS($C1-TODAY())<=365) for the green
Formula is =(ABS($C1-TODAY())365) for the red
But of course it doesn't deal with the subtleties of leap years.
--
David Biddulph

"Jason Bartup" <Jason wrote in
message ...
I wish for certain cell to be say green if date entered is within one
year of
todays date. Then change to red if date is over one year of todays
date. I
know this is possible but cant get the right formular





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel: Having more than 3 conditional formats would be helpful. Lee Ellen Excel Worksheet Functions 2 October 18th 06 07:00 PM
Conditional formats don't print Mark Lincoln Excel Discussion (Misc queries) 0 August 25th 06 06:26 PM
how can i set more than three conditional formats to xl worksheet Andy A112 Excel Worksheet Functions 2 August 9th 06 08:37 PM
Paste Special Formats Generated by Conditional Formatting ExcelMonkey Excel Discussion (Misc queries) 6 May 22nd 06 07:10 PM
how do I apply more than 3 conditional formats in excel chetwyndthomas Excel Discussion (Misc queries) 1 January 30th 05 04:24 PM


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"