Count date occurences by month and year
Greetings!
I have a column that contains thousands of dates. I need to count the number of dates that are in a given month and year.
In Excel, I use this formula to count the number of dates that are June 2020:
=SUMPRODUCT(1*(YEAR(date)=2020),(1*(MONTH(date)=6))) "date" is the named range for the column of dates.
When I opened up the spreadsheet in Numbers, this is the converted formula:
SUMPRODUCT(1×(YEAR(DATA::Table 1::$C$2:$C$2470)=2020),(1×(MONTH(DATA::Table 1::$C$2:$C$2470)=6))) "DATA::Table 1::$C$2:$C$2470" is the sheet and column with the dates.
This produces incorrect results and a message "The formula uses a Boolean in place of a number.".
Could someone please help me out? I'd appreciate it.
This conversion is the first time I've been exposed to Numbers. For the record, I did do a search before asking the question.
Thanks!
iMac 21.5″, macOS 10.15