View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Determining a leap year

Lotus had a bug in their program and MS used it to be compatible when Lotus
was the main spreadsheet program.
I am sure in the unlikely event that someone is using 1900 one can remove
that using IF

--


Regards,


Peo Sjoblom


"James Silverton" wrote in message
...
Rick wrote on Mon, 30 Jun 2008 14:30:40 -0400:

And, generalizing this, here is the formula that returns
TRUE if a given year is a leap
year... =ISNUMBER(--(A1&"-02-29")) where A1 contains a year value
(2000, 2007, 2008, etc.).

A nice solution, with the caveat that numbers 1 through 28
entered in cell A1, will give a false TRUE as Excel will
"helpfully?" treat these as 01 Feb 2029 through 28 Feb 2009


Thanks. To me, all years should be specified with 4-digits... I probably
should have mentioned that in my note...


"where A1 contains a 4-digit year value (2000, 2007, 2008,
etc.)"


But the ISNUMBER formula believes that 1900 is a leap year.

--

James Silverton
Potomac, Maryland

E-mail, with obvious alterations: not.jim.silverton.at.verizon.not