Excel function to determine how many days in year YYYY

CD2017

New Member
Joined
Feb 21, 2017
Messages
33
Hello,

I need to determine whether my daycount should be 365 or 366 depending on the year. For example in 2016 it was 366 and in 2017 it's 365.

Is there a function which will do this?

Thanks,
Clare
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I should have said. There will be a cell containing the year 2016, and I want a formula to determine how many days are in that year.

Thanks![

QUOTE=CD2017;4821450]Hello,

I need to determine whether my daycount should be 365 or 366 depending on the year. For example in 2016 it was 366 and in 2017 it's 365.

Is there a function which will do this?

Thanks,
Clare[/QUOTE]
 
Upvote 0
Try where E1 has the year
Code:
=DATE(E1,12,31)-DATE(E1,1,1)+1
 
Upvote 0

Excel 2010
EF
12016366
2TRUE
3366
4
3d
Cell Formulas
RangeFormula
F1=DATE(E1,12,31)-DATE(E1,1,0)
F2=DAY(DATE(E1,3,0))=29
F3=365+(DAY(DATE(E1,3,0))=29)
 
Upvote 0
Upvote 0
I suggest this formula
=IF(MOD(E1,100)=0,IF(MOD(E1,400)=0,366,365),IF(MOD(E1,4)=0,366,365))

M.
 
Upvote 0

Forum statistics

Threads
1,215,700
Messages
6,126,301
Members
449,308
Latest member
VerifiedBleachersAttendee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top