1. Home
  2. Functions
  3. Math
  4. SUMIF

SUMIF function

Adds the cells that meet a condition.

Syntax

=SUMIF(range, criteria, [sum_range])

Arguments

ArgumentRequiredDescription
rangeRequiredThe cells to check against the condition
criteriaRequiredThe condition, like 5, ">10", "apple" or "a*"
sum_rangeOptionalThe cells to add (the checked cells when left out)

How to use SUMIF

SUMIF takes 2 required arguments and 1 optional argument. Type =SUMIF( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=SUMIF(A1:A4, ">160000")Result 900000
Data in the sheet
A
1100000
2200000
3300000
4400000
=SUMIF(A1:A3, "x", B1:B3)Result 4
Data in the sheet
AB
1x1
2y2
3x3

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.