SUMIF is GROUP BY with a WHERE clause, collapsed into one cell.
SELECT region, SUM(amount) FROM invoices WHERE status = 'Paid' GROUP BY region =SUMIF(B:B,"Paid",C:C) That sums column C where column B says Paid, for the whole sheet. One number, no pivot, no refresh.
The argument order is the trap
=SUMIF(range_to_test, criteria, range_to_sum) The test range comes first. The sum range comes last and is the only optional part. If you leave it out, Excel sums the test range itself, which is right when you are summing the same column you filter on and wrong everywhere else.
People who write SQL read it backwards the first time. SUMIF(B:B,"Paid",C:C) filters on B and sums C. Not the other way round.
Per-group totals without a pivot table
Put the group names down a column, then one formula dragged down:
=SUMIF($B:$B,$E2,$C:$C) $E2 is the group name on that row. Lock the ranges with $, leave the criteria row relative, drag down. This is a GROUP BY that updates as you type, and it is what I use when the sheet has to stay readable for someone who will never open a pivot table.
More than one condition
That is SUMIFS, and the argument order changes again:
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2) The sum range comes first here. It is the opposite of SUMIF, and it is the single most common source of wrong totals I see in shared workbooks. Check the first argument before you check anything else.
Numbers stored as text
SUMIF matches criteria as text. A column of amounts imported as text looks right, aligns left, and sums to zero. Convert the column with Data, Text to Columns, or multiply by 1 in a helper column. The sum will not fix itself.
Dates
Criteria that compare dates need the operator in quotes and the date joined with &:
=SUMIF(D:D,">="&DATE(2026,11,1),C:C) DATE(2026,11,1) is safer than typing a date string, because the string is read in the machine's locale and breaks on a laptop set to another country.
When to stop using SUMIF
Past about five conditions, or when the output needs more than one measure, use a pivot table or Power Query. SUMIF is for one number in a summary block, not for a report. The moment you are writing six of them side by side, the pivot is faster to build and much faster to check.
The full guide with five worked examples and the error fixes is on my blog: Excel SUMIF function.
