Totals and counts function

SUMIF

Total the matching rows.

Purpose

Total the rows that meet one condition

Returns

The total of the matching rows

Syntax

=SUMIF(range, condition, [sum_range])

ArgumentRequiredWhat goes here
rangeRequiredThe column to test.
conditionRequiredWhat that column has to match.
sum_rangeOptionalThe column of amounts to add. The tested column is used if you leave it out.

How to use SUMIF

SUMIF takes the column to test, the condition, and the column to add. Leave the third out and it adds the column it tested, which is what you want when the test and the amounts are the same figures.

The order is worth memorising because SUMIFS reverses it: SUMIF tests first and adds last, SUMIFS adds first and tests after.

The tested column and the added column have to cover the same rows, or the amounts come off rows that were never tested.

Examples

Every result below is worked out by the same evaluator that marks your answers, on the sheet shown here.

Payables ageing — October.xlsxSheet1
Harbour Foods payables at 31 October 2026, with supplier terms alongside
ABCDEFGH
1InvoiceSupplierStatusDays overdueAmountSupplierTerms (days)
2INV-8801Brightwell PaperOverdue12940Ashgrove Catering30
3INV-8802Calder UtilitiesQueried471180Brightwell Paper30
4INV-8803Meridian FreightOverdue632450Calder Utilities14
5INV-8804Ashgrove CateringOn terms0405Meridian Freight45
6INV-8805Brightwell PaperOverdue38760Thornbury Print60
7INV-8806Thornbury PrintOverdue911320
8INV-8807Meridian FreightOn terms0580
9INV-8808Calder UtilitiesOverdue24215
FormulaResult
=SUMIF(C2:C9,"Overdue",E2:E9)How much of the ledger is overdue, rather than how many invoices are.5685
=SUMIF(D2:D9,">60",E2:E9)The value sitting past sixty days, which is the figure a provision is usually built on.3770
=SUMIF(E2:E9,">1000")With no third argument, the tested column is the one added.4950
=SUMIF(B2:B9,"Brightwell Paper",E2:E9)One supplier's exposure. This is what a pivot table is doing when it groups by supplier.1700

Notes

  • SUMIF tests first, SUMIFS adds first. Getting the two the wrong way round is the usual mistake.
  • The two ranges must cover the same rows.
Practise SUMIF in Unit 08

A reference tells you what it does. A unit makes you use it.