From: Brad on
You're welcome

Another approach that would also work

=365+(MONTH(DATE(A2,2,29))=2)

Success click yes
--
Wag more, bark less


"igbert" wrote:

> Thanks, formula works preferct for any year.
>
>
> "Brad" wrote:
>
> > assume 2008 is in a2
> > in b2
> > =DATE(A2+1,1,0)-DATE(A2,1,0)
> >
> > Success - click yes.
> > --
> > Wag more, bark less
> >
> >
> > "igbert" wrote:
> >
> > > Is there a fuction to return the days in a given year?
> > >
> > > Entry Return
> > >
> > > 2008 366
> > > 2010 365
> > >
> > > Igbert
> > >
From: Mike H on
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
> >
From: Bernd P on
On 14 Mai, 18:19, Brad <B...(a)discussions.microsoft.com> wrote:
> You're welcome
>
> Another approach that would also work
>
> =365+(MONTH(DATE(A2,2,29))=2)
>
> Success click yes
> --
> Wag more, bark less
>
> "igbert" wrote:
> > Thanks, formula works preferct for any year.
>
> > "Brad" wrote:
>
> > > assume 2008 is in a2
> > > in b2
> > > =DATE(A2+1,1,0)-DATE(A2,1,0)
>
> > > Success - click yes.
> > > --
> > > Wag more, bark less
>
> > > "igbert" wrote:
>
> > > > Is there a fuction to return the days in a given year?
>
> > > > Entry      Return
>
> > > > 2008      366
> > > > 2010      365
>
> > > > Igbert

=337+DAY(DATE(A1,3,0))

Regards,
Bernd
From: Mike H on
Mickey,

> Would you be so kind and check your suggested formula for the years:
> 1908, 2008, 2108 and 2200(!)

Of course


1908 = leap year
2008 = leap year
2108 - leap year
2200 - Not a leap year


--
Mike

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


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

> Mike,
> Would you be so kind and check your suggested formula for the years:
> 1908, 2008, 2108 and 2200(!)
> Micky
>
>
> "Mike H" wrote:
>
> > 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
> > > >
From: Mike H on
Mickey,

For clarification:-

A leap year is every 4 years, but not every 100 years, then again every 400
years
--
Mike

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


"Mike H" wrote:

> Mickey,
>
> > Would you be so kind and check your suggested formula for the years:
> > 1908, 2008, 2108 and 2200(!)
>
> Of course
>
>
> 1908 = leap year
> 2008 = leap year
> 2108 - leap year
> 2200 - Not a leap year
>
>
> --
> Mike
>
> When competing hypotheses are otherwise equal, adopt the hypothesis that
> introduces the fewest assumptions while still sufficiently answering the
> question.
>
>
> "מיכאל (מיקי) אבידן" wrote:
>
> > Mike,
> > Would you be so kind and check your suggested formula for the years:
> > 1908, 2008, 2108 and 2200(!)
> > Micky
> >
> >
> > "Mike H" wrote:
> >
> > > 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
> > > > >