View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default If a date range contains a leap year (date)

On Fri, 4 Jul 2008 17:11:46 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

it will not work in the
general case if the EndDate is greater than 6/5/2079


I don't understand that limitation.

If I enter

StartDate 1/1/2000
EndDate 12/31/2100

I get TRUE as a result, and the SUMPRODUCT part gives a result of 25, which I
believe is correct (2000 was a leap year; 2100 will not be).

However, it will not give the correct result if the year 1900 is included in
the range, since Excel (and Lotus) think 1900 was a leap year.
--ron