Forum Discussion
Counting the number of days of a project during each year
Your calculations are not quite correct. For example, in 2015, January 1 to April 30 is 31+28+31+30=120 days.
See the attached workbook.
This is super helpful...thank you! I'd like to have the worksheet count days in the total and per calendar year if the project end date is empty. Can you modify your file to deal with that?
Edit: For the Total, it should be =IF(ISBLANK(C3),(TODAY()-B3)+1,C3-B3+1), but having difficulty with the year by year amounts.
Thanks in advance!
- HansVogelaarMar 15, 2023MVP
See the attached version.
- barak1948Mar 15, 2023Copper Contributor
Thank you for the quick response! Posting this for others looking at this:
I didn't need the prior users need to accommodate strange start and end date of years (he wanted the year specified as 6/1 - 5/31). The version you attached kept that. Switching the formula in cell F3 to:
=MAX(MIN(DATE(F$2,12,31),IF($C3="",TODAY(),$C3))-MAX(DATE(F$2,1,1),$B3)+1,0)
and copying to the other cells got it back to the "normal" 1/1 - 12/31 calendar year cycle.