View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Obtain days in a given year

Micky,

I like the second formula, very neat, but I'm afraid the first gives errors,
you would need to do this to get the correct result using MOD

=IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)< 0)),366, 365)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"מיכאל (מיקי) אבידן" wrote:

1) =IF(MOD(A1,4)=0,366,365)
2) =IF(ISNUMBER(--(A1&"/2/29")),366,365)
Micky


"igbert" wrote:

Is there a fuction to return the days in a given year?

Entry Return

2008 366
2010 365

Igbert