Hello!
I'm wondering how I count numbers of days per month month within a dateinterval?
Here is an exempel of how I want it.
A B C D E F
1. Start date End date Jan Feb Mar Apr
2. 01-15-2019 04-08-2019 17 28 31 8
I have the start date and the end date to begin with. And also in cell C1 it says 01-01-2019 and not just Jan and so on for the rest of the months.
I have tried this formula: =MAX(0,(MIN($A2,DATE(YEAR(C$1),MONTH(C$1)+1,0))-MAX($B2,C$1)+1))
However, for January I get the number 31 instead of 17.
Anyone have a solution?
Thanks!
I'm wondering how I count numbers of days per month month within a dateinterval?
Here is an exempel of how I want it.
A B C D E F
1. Start date End date Jan Feb Mar Apr
2. 01-15-2019 04-08-2019 17 28 31 8
I have the start date and the end date to begin with. And also in cell C1 it says 01-01-2019 and not just Jan and so on for the rest of the months.
I have tried this formula: =MAX(0,(MIN($A2,DATE(YEAR(C$1),MONTH(C$1)+1,0))-MAX($B2,C$1)+1))
However, for January I get the number 31 instead of 17.
Anyone have a solution?
Thanks!