View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\)[_797_] Rick Rothstein \(MVP - VB\)[_797_] is offline
external usenet poster
 
Posts: 1
Default Determining a leap year

There is a general solution given in
http://support.microsoft.com/kb/214019

=IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)< 0)),"Leap Year", "NOT a
Leap Year")


Perhaps a little less calculation intensive (2 function calls as compared to
6)...

=IF(ISNUMBER(--(A1&"-02-29"))-(A1=1900),"Leap Year", "Not a Leap Year")

Rick