Function reference /Math & aggregation

SUMIF

Run in a real sheet

Adds up the numbers in a range, but only the rows that meet one condition.

SUMIF(range, criterion, [sum_range])

SUMIF is the workhorse of every summary tab: total sales for one region, total hours for one person, total spend in one category.

Executed 23 Aug 2026 Google Sheets · unedited screenshot
=SUMIF(A2:A6, "West", C2:C6) running in Google Sheets, returning 2700
The formula sits in the formula bar and its answer sits in the grid, in one frame. Sales are added only for the rows whose region is West.

Worked example

RegionRepSales
WestAna1200
EastBen900
WestCara1500
NorthDan600
EastEve1100
=SUMIF(A2:A6, "West", C2:C6)

Returns 2700.

Arguments

ArgumentRequiredWhat it does
range Yes The range the condition is tested against.
criterion Yes What to test for — a value, or a comparison in quotes such as ">800".
sum_range Optional The numbers to add. Omit it to add up `range` itself.

Gotchas

  • 01The argument order is different from SUMIFS: SUMIF puts the sum range last, SUMIFS puts it first.
  • 02Comparisons must be a text string: ">800", not >800.
  • 03range and sum_range must be the same height, or the totals silently come out wrong.
  • 04Criteria are not case sensitive, and * and ? act as wildcards — which surprises people summing product codes.