SheetsLessons
Conditional function

SUMIF function in Google Sheets

SUMIF adds up values that meet one condition, such as total revenue for the West region or the sum of all orders over $1,000.

Syntax

=SUMIF(range, criterion, [sum_range])
range
The cells to test against the criterion.
criterion
The condition, e.g. "West", ">1000" or a cell reference.
sum_range
Optional. The cells to add up. If omitted, the cells in range are summed.

Practice SUMIF

Task 1 of 3

Total the sales for the East region. Answer in E2.

E2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

SUMIF examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCDE
1RepRegionProductUnitsRevenue
2AvaWestMonitor12$2,400.00
3LiamEastKeyboard30$1,500.00
4MayaWestMouse45$900.00
5NoahNorthMonitor8$1,600.00
6ZaraEastMonitor15$3,000.00
7OmarWestKeyboard22$1,100.00
Sales by rep
FormulaResultWhat it shows
=SUMIF(B2:B7, "West", E2:E7)$4,400.00Revenue from the West.
=SUMIF(E2:E7, ">2000")$5,400.00Without sum_range, the tested cells themselves are added.
=SUMIF(C2:C7, "*board", D2:D7)52Wildcards work: products ending in "board".

Tips and common mistakes

  • range and sum_range should be the same size and line up row for row.
  • For more than one condition use SUMIFS. Note that its argument order is different.

Related functions