SUMIF and SUMIFS in Google Sheets (With Examples)
Use SUMIF and SUMIFS in Google Sheets to total by category, date range or several conditions, with cell-based criteria, wildcards and a QUERY alternative.
By Ayoub Farid · · 1 min read
SUMIF adds values that meet one condition; SUMIFS handles several. Both work in Google Sheets exactly as in Excel.
SUMIF
=SUMIF(range, criterion, [sum_range])
Total spend on Food (categories in B, amounts in C):
=SUMIF(B2:B200,"Food",C2:C200)
Amounts over 100:
=SUMIF(C2:C200,">100")
SUMIFS
=SUMIFS(sum_range, criteria_range1, criterion1, ...)
Food spend in March (dates in A):
=SUMIFS(C2:C200,B2:B200,"Food",A2:A200,">="&DATE(2026,3,1),A2:A200,"<"&DATE(2026,4,1))
Criteria from a cell
=SUMIF($B$2:$B$200,F2,$C$2:$C$200)
=SUMIF(C2:C200,">"&F1)
Wildcards
=SUMIF(A2:A200,"*coffee*",C2:C200)
Summary table in one formula
List categories with UNIQUE, then total each with SUMIF in ARRAYFORMULA:
=ARRAYFORMULA(SUMIF(B2:B200,F2:F10,C2:C200))
Or use QUERY:
=QUERY(A1:C200,"select B, sum(C) group by B",1)
Common problems
Ranges of different sizes, numbers stored as text, trailing spaces. Same fixes as Excel. Full details: SUMIF and SUMIFS.
Frequently asked questions
How do I use SUMIF in Google Sheets?
=SUMIF(condition_range,"condition",sum_range).
How do I sum with multiple conditions in Google Sheets?
Use SUMIFS, with the sum range first.
How do I SUMIF by date in Google Sheets?
Use SUMIFS with ">="&start and "<"&end conditions on the date column.
Is SUMIF case-sensitive in Google Sheets?
No.