View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_810_] Rick Rothstein \(MVP - VB\)[_810_] is offline
external usenet poster
 
Posts: 1
Default If a date range contains a leap year (date)

Unless I am reading your request incorrectly, I do not get either Kostis nor
Bob's formulas producing the correct results. Where your results are

TRUE TRUE FALSE TRUE

I get both of theirs as returning

TRUE FALSE TRUE FALSE

Rick



"Rebecca_SUNY" wrote in message
...
Both of these posts answer the question but Bob's is easier for me to
understand.


"Bob Phillips" wrote:

=AND(MONTH(DATE(YEAR(B3),2,29))=2,DATE(YEAR(B3),2, 29)=B1,DATE(YEAR(B3),2,29)<=B3)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Rebecca_SUNY" wrote in message
...
I need to identify whether a date range contains a leap year day - 2/29.
I
have a start date and end date and leap year True/False indicator

Start Date 01/01/08 01/01/08 03/31/08 06/30/07

End Date 12/31/08 06/30/08 12/31/08 03/01/08

Leap Year? TRUE TRUE FALSE TRUE

I can say that the range must be (will be) less than or equal to
365/366.

Thanks!