View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default IF formula to allow Feb 29th in a leap year

Both I and Ron forgot to mention that A15 or A1 refer to a cell cotaining
year number.
Stefi


€˛Ron Rosenfeld€¯ ezt Ć*rta:

On Tue, 24 Feb 2009 06:18:09 -0800, Mike M.
wrote:

I know the rule that a leap year has to be divisable by 400 or divisable by 4
& 100 but I can't figure out how to put it in a IF formaula. Can anyone help?


Depending on your purpose for doing this, the following might suffice (for
every valid Excel year except 1900):

=IF(DAY(DATE(A1,2,29))=29,"Leap Year","Not Leap Year")
--ron