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

Actually, I take that back... at one function call less, I think this one is
more efficient...

=365+ISNUMBER(--(YEAR(TODAY())&"-02-29"))

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
But won't something like:

=365+(MONTH(DATE(YEAR(TODAY()),2,28)+1)=2)

do just as well?


I came up with a similar idea, just expressed differently...

=365+ISNUMBER(MONTH(--(YEAR(TODAY())&"-02-29")))

Same number of function calls, but yours avoids the concatenation, so I'm
guessing yours is more efficient.

Rick