FlorianT.
FlorianT.

Reputation: 873

COUNTIFS Date contains this month - Google Sheets

Column A contains Datevalues. Column B a String. I would like to count all cells where A is this month and B contains a certain String.

Here is my approach: =COUNTIFS(B1:B; "Certain String"; MONTH(A1:A); MONTH(TODAY()))

Unfortunately this approach does not work. Any idea?

Upvotes: 1

Views: 2554

Answers (2)

player0
player0

Reputation: 1

=ARRAYFORMULA(COUNTIFS(B:B, "string", MONTH(A:A), "="&MONTH(TODAY())))

Upvotes: 1

pnuts
pnuts

Reputation: 59450

=COUNTIFS(B:B;"Certain String";A:A;">"&eomonth(Today();-1);A:A;"<="&eomonth(Today();0))

Does not count this month in other than this year.

Upvotes: 2

Related Questions