SUMIFS & COUNTIFS in Google Sheets
When one condition isn't enough, use the plural versions. SUMIFS puts the sum range first, then any number of range/condition pairs: =SUMIFS(D2:D99, A2:A99, "North", B2:B99, "Q1"). COUNTIFS takes just the pairs.
All conditions must be true for a row to count (AND logic). For OR logic, add two SUMIFS together. Date ranges are a common use: =COUNTIFS(C2:C99, ">="&F1, C2:C99, "<"&G1) counts dates in a window.
Syntax
=SUMIFS(sum_range, range1, criterion1, [range2, criterion2, …])
Example
=SUMIFS(D2:D99, A2:A99, "North", B2:B99, "Q1")
North region sales in Q1 only.
Common mistakes
- Putting the sum range last, as in SUMIF.
- Expecting OR behaviour from multiple conditions.
- Unequal range sizes, which return an error.
← SUMIF · AVERAGEIF, MAXIFS & COUNTUNIQUE → · All lessons