SUMIF & COUNTIF Formula Generator
SUMIF adds up numbers that meet one condition; COUNTIF counts cells that meet one condition. Their plural cousins SUMIFS and COUNTIFS handle multiple conditions. Fill in the range and criteria below to generate the correct formula for Excel or Google Sheets.
It's free, browser-based, and requires no account.
=SUMIF(A2:A100, ">100", B2:B100)
SUMIF vs COUNTIF vs SUMIFS
Use SUMIF to total values matching one condition: =SUMIF(range, criteria, [sum_range]).
Use COUNTIF to count cells matching one condition: =COUNTIF(range, criteria).
Use SUMIFS when you have two or more conditions: =SUMIFS(sum_range, criteria_range1, criteria1, ...). Note the argument order flips — the sum range comes first in SUMIFS.
Writing criteria correctly
Text and comparison criteria go in quotes: "Marketing", ">100", "<=2024-01-31".
To reference a cell in the criteria, join it with & — for example ">"&B1.
Wildcards work in text criteria: * matches any number of characters, ? matches a single character.
Frequently asked questions
What is the difference between SUMIF and SUMIFS?
SUMIF handles a single condition and puts the sum range last. SUMIFS handles multiple conditions and puts the sum range first. If you need more than one criterion, use SUMIFS.
How do I count cells that contain specific text?
Use COUNTIF with a text criterion, e.g. =COUNTIF(A2:A100, "Complete"). Use wildcards like "*done*" to match partial text.
Do SUMIF and COUNTIF work in Google Sheets?
Yes. SUMIF, COUNTIF, SUMIFS, and COUNTIFS all use the same syntax in Google Sheets and Excel.
Keep exploring
Analyze a whole spreadsheet with AI
Upload an Excel or CSV file and get pivots, outlier detection, and Smart BI dashboards in seconds. Free to start — no credit card.
Open the App Free