2
votes

I have a Google sheet with a column of dates. I would like to get a total for each month, so that I can see how many of the dates are January, February, March, etc. This formula does not work (Dates is the name of range):

=COUNTIF(Dates,Month=1)

Any help is appreciated.

2

2 Answers

3
votes

Following the logic of your proposition, the error is that MONTH() returns an integer, not an array. You can add ARRAYFORMULA() to do the job :

=COUNTIF( ARRAYFORMULA( MONTH( Dates ) ), "=2" )
1
votes

I finally devised the correct search term for Google help

=sumproduct(month(Dates)=2)