0
votes

In sheet "Sent" I have one row filled with dates in the format MM/dd/yyyy (with header row), such as:

DATES 5/12/2015 4/12/2012 5/7/2015 5/7/2014

I would like to count the number of rows which match the current month & year. In the example above, the result would obviously be two (when it's May 2015).

Is this possible to achieve this result using a function using Google Spreadsheet?

Thank you!

1

1 Answers

0
votes

If the dates are in A2:A5 and the reference date in B2, then

=countifs(A2:A5,">="&date(year(B2),month(B2),1),A2:A5,"<="&eomonth(B2,0))

If the dates are in a separate sheet but the reference date in the same sheet, this would be

=countifs(Sent!A2:A5,">="&date(year(B2),month(B2),1),Sent!A2:A5,"<="&eomonth(B2,0))