I have a sheet where A4:A368 contain all dates for the current year. In column B (B4:B368) I enter data for a day if some event has happened. So it may be that column B contains data (number or text) or remains blank.
Now I want to count the number of events that happened in 1 month
With =SUMPRODUCT(MONTH(A4:A368)=1,B4:B368)
I can get the summation of the events, but I would like to have the count (aka number of events).
I tried with =COUNTIF(MONTH(A4:A368), "=1")
which gives an error (504) and =COUNTIF(B4:B368,MONTH(A4:A368)=1)
which always returns 0
Is there anyway I can find all days of a month in column A and count the number of cells that contain data for that month ?