Hi!

I am working on an ongoing sheet in which I am writing dates into a column. I am trying to use the sumproduct function to count the number of dates that I have written that lies within a specific month.

Example:

(dd-mm-year)
A1: 01-01-2017
A2: 03-01-2017
A3: 21-01-2017
A4: 02-02-2017
A5: 26-02-2017
A6: 05-03-2017

Using the following function, I can count how many dates that is in January:

=SUMPRODUCT(1*(MONTH(A1:A20)=1))

Now, the formula should be returning the value of 3, but since it is an ongoing sheet, I need the matrix to include all rows in the column. But then I get the month count wrong, because a blank string apparently counts as "month=1".

For the above example with the given formula, it returns a value of 17.

How do I make the formula to only count the strings in which I wrote a date?

(sorry for bad english) :-)