# Thread: Days in year (2003)

1. ## Days in year (2003)

Any function that will calculate the number of days in a year?

2. ## Re: Days in year (2003)

Say that you enter a year in cell A1. The formula
<code>
=365+(MOD(A1,4)=0)
</code>
will return the number of days in that year; it's correct for all years from 1901 to 2099. Alternatively, the formula
<code>
=DATE(A1+1,1,1)-DATE(A1,1,1)
</code>
is correct for all years from 1901 to 9998.

3. ## Re: Days in year (2003)

What if the year is a fiscal year other than a calendar year, say October 1 through September (trying to capture a function that will automatically recognize leap years!)

4. ## Re: Days in year (2003)

You can use
<code>
=DATE(A1+1,10,1)-DATE(A1,10,1)
</code>
where 10 is the number of the month the fiscal year starts (1 = January, 2 = February etc.)

5. ## Re: Days in year (2003)

You can also use the DATEDIF function, for more info see http://www.cpearson.com/excel/datedif.aspx

6. ## Re: Days in year (2003)

Thanks to all!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•