Forum Discussion
CollinRosser
Dec 07, 2021Copper Contributor
Counting the number of each month between two dates?
Howdy, I am attempting to build a calculator that quantifies weather days in a time period by first quantifying the number of each month (EX: January: 3, Feburary: 3, March: 2, etc...) between tw...
Juliano-Petrukio
Dec 11, 2021Bronze Contributor
You can use the follow approach. You just need to update the Month Index and the days of the month in the formula.
=SUMPRODUCT(N(MONTH(ROW(INDIRECT($G$14&":"&$I$16)))=MonthIndex))/NumberOfDays
1=Jan
31=Total of days of Jan
=SUMPRODUCT(N(MONTH(ROW(INDIRECT($G$14&":"&$I$16)))=1))/31