Data Analysis

COUNTIF + ARRAYFORMULA by Month in Google Sheets (2026)

Marc SeanMay 31, 20265 min read

Why COUNTIF Breaks on Month Ranges

Dates in Google Sheets are stored as serial numbers. January 1, 2025 is 45658. March 15, 2025 is 45731. When you write =COUNTIF('Deals'!A:A, 3) hoping to count March closings, you're asking how many cells equal the integer 3. None of them do - they're all 5-digit serial numbers - so the result is 0.

The MONTH() workaround doesn't fix it. If you try:

=COUNTIF('Deals'!A:A, MONTH(TODAY())=3)

Google Sheets evaluates MONTH(TODAY())=3 first, gets TRUE or FALSE, then counts how many cells in column A equal that single boolean. That's not a month filter - it's a logical test masquerading as one.

Wrapping it in ARRAYFORMULA doesn't help either. According to Google's Sheets documentation, COUNTIF's criteria argument accepts "a string, number, regular expression or reference to a cell containing such." It's not designed to expand an array of criteria row-by-row. ARRAYFORMULA can't force that behavior onto a function that isn't built for it.

The 3 Patterns That Actually Work

PatternBest ForNeeds ARRAYFORMULA?Spills?
COUNTIFS + DATE/EOMONTHSingle-month count per cellNoNo
SUMPRODUCTFlexible multi-condition countsNoNo
ARRAYFORMULA + COUNTIFS + SEQUENCEFull-year summary, one formulaYesYes (12 rows)

Pattern 1: COUNTIFS with Date Bounds

This is the most readable approach for a monthly summary table. Construct an explicit date range - first of month to last of month - and COUNTIFS handles the rest.

If your Summary tab has month numbers in column A (1 through 12) and a year in Assumptions!$B$1:

=COUNTIFS(
  'Deals'!$A:$A, ">="&DATE(Assumptions!$B$1, Summary!A2, 1),
  'Deals'!$A:$A, "<="&EOMONTH(DATE(Assumptions!$B$1, Summary!A2, 1), 0)
)

EOMONTH handles February's 28/29-day variance and every other month-end edge case. No manual day counts needed.

For a pipeline model tracking deals by segment, layer in more criteria. COUNTIFS supports up to 127 criteria pairs per Google's documentation, so you have room:

=COUNTIFS(
  'Deals'!$A:$A, ">="&DATE(Assumptions!$B$1, Summary!A2, 1),
  'Deals'!$A:$A, "<="&EOMONTH(DATE(Assumptions!$B$1, Summary!A2, 1), 0),
  'Deals'!$E:$E, "Enterprise"
)

Pattern 2: SUMPRODUCT

SUMPRODUCT is natively array-aware. It evaluates arrays element-by-element without any ARRAYFORMULA wrapper. This makes it the right tool when you want to match on MONTH() and YEAR() directly rather than constructing date bounds:

=SUMPRODUCT(
  (MONTH('Deals'!$A$2:$A$1000)=Summary!A2) *
  (YEAR('Deals'!$A$2:$A$1000)=Assumptions!$B$1)
)

One practical note: use bounded ranges rather than full-column references inside SUMPRODUCT. $A$2:$A$1000 instead of $A:$A. On a 5,000-row CRM export, SUMPRODUCT on an unbounded column recalculates every blank cell too, which adds up. On a bounded range it's fast - typically under half a second for a dataset that size.

SUMPRODUCT also handles conditions that don't fit neatly into date range notation. Counting Q4 closings across any year:

=SUMPRODUCT(
  (MONTH('Deals'!$A$2:$A$1000)>=10) *
  (MONTH('Deals'!$A$2:$A$1000)<=12)
)

Pattern 3: ARRAYFORMULA + COUNTIFS + SEQUENCE

This is the one worth knowing for board packs. COUNTIFS (plural, unlike COUNTIF) does work with ARRAYFORMULA when you feed it an array of criteria values. Combined with SEQUENCE, one formula spills 12 monthly counts:

=ARRAYFORMULA(
  COUNTIFS(
    'Deals'!$A$2:$A$1247, ">="&DATE(Assumptions!$B$1, SEQUENCE(12), 1),
    'Deals'!$A$2:$A$1247, "<"&DATE(Assumptions!$B$1, SEQUENCE(12)+1, 1)
  )
)

Place this in B2 of your Summary tab and it spills January through December counts downward. Change the year in Assumptions!$B$1 and all 12 rows rebuild instantly.

SEQUENCE(12) generates {1;2;3;...;12} as a vertical array. ARRAYFORMULA tells COUNTIFS to evaluate each element separately, producing 12 separate counts stacked in a column. DATE(year, 13, 1) correctly resolves to January 1 of the following year, so December handles without a special case.

Pairing COUNTIFS and SUMIFS with Identical Date Logic

The real payoff of Pattern 3 is that SUMIFS shares the same SEQUENCE structure. If your board pack needs both monthly deal counts and monthly new ARR side by side, both formulas use identical date bounds:

=ARRAYFORMULA(
  COUNTIFS(
    'CRM Export'!$A$2:$A$1247, ">="&DATE(Assumptions!$B$2, SEQUENCE(12), 1),
    'CRM Export'!$A$2:$A$1247, "<"&DATE(Assumptions!$B$2, SEQUENCE(12)+1, 1),
    'CRM Export'!$E$2:$E$1247, "Enterprise"
  )
)
=ARRAYFORMULA(
  SUMIFS(
    'CRM Export'!$C$2:$C$1247,
    'CRM Export'!$A$2:$A$1247, ">="&DATE(Assumptions!$B$2, SEQUENCE(12), 1),
    'CRM Export'!$A$2:$A$1247, "<"&DATE(Assumptions!$B$2, SEQUENCE(12)+1, 1),
    'CRM Export'!$E$2:$E$1247, "Enterprise"
  )
)

One assumption cell drives both columns. That's the kind of structure that survives a fiscal year rollover without a 20-minute formula audit.

The Hidden Reason COUNTIFS Returns 0 When You Know There's Data

If you've built the COUNTIFS correctly and still get 0, your date column probably contains text strings formatted to look like dates, not real date values. Google Sheets stores actual dates as serial numbers; COUNTIFS date comparisons only work against true date values. Text-formatted dates - common in Salesforce exports and NetSuite downloads - look identical in the cell but fail silently in any comparison formula.

Check by selecting a date cell. If the value is left-aligned, it's text. If it's right-aligned, it's a real date. Fix it with =ARRAYFORMULA(DATEVALUE(A2:A1000)) across the column, or use Data > Split text to columns on the affected range to trigger Google's auto-conversion.

As of May 2026, Google Sheets doesn't auto-convert text-formatted dates inside COUNTIFS criteria comparisons. This limitation hits finance teams most often on raw CRM or ERP exports, where date formatting consistency depends entirely on whoever configured the export.

For a deeper look at COUNTIF by month without the ARRAYFORMULA angle, see COUNTIF by Month in Google Sheets.

If building these multi-criteria monthly formulas by hand gets tedious across a 12-tab model, ModelMonkey's AI assistant can generate the COUNTIFS + SEQUENCE structure from a plain description of your summary layout. Try ModelMonkey free for 14 days - it works in both Google Sheets and Excel.

Frequently Asked Questions