Formualizer Docs

SUMIF

Adds values that satisfy a single criterion.

SUMIF evaluates each cell in range against criteria, then sums corresponding values.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=SUMIF(range, criteria, [sum_range])

Arguments

ArgumentTypeRequiredDefault
rangeanyRequired—
criteriaanyRequired—
sum_rangeanyOptional—

Differences from Excel

Excel requires a reference for the optional result range, where Formualizer can evaluate a non-reference expression and propagate its error. Formualizer also accepts array constants as the criteria range, which Excel requires to be a reference.

Remarks

  • An equality criterion for a date or number ("10/26/1999", "36459", 36459) also matches text cells holding that date; <> and ordering criteria do not read date text.
  • If sum_range is omitted, matching cells from range are summed.
  • Criteria support operators like ">10" and wildcard text patterns.
  • Cells that do not coerce to numbers in the sum target contribute 0.

Examples

Select East records by label and aggregate the corresponding numbers.

Formula =SUMIF(A1:A3,"East",B1:B3)

Input cells
AB
1"East"10
2"West"50
3"East"20

Expected result 30

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Omit the result range so the criterion and calculation use the same cells.

Formula =SUMIF(C1:C3,">2")

Input cells
C
12
24
36

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Aggregate a single row that satisfies the criterion.

Formula =SUMIF(A1:A1,"East",B1:B1)

Input cells
AB
1"East"10

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Sum values above a threshold

Formula =SUMIF(A1:A3, ">10")

Input cells
A
15
215
325

Expected result 40

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use separate sum range

Formula =SUMIF(A1:A3, "East", B1:B3)

Input cells
AB
1"East"10
2"West"40
3"East"20

Expected result 30

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What happens when matching cells are non-numeric in SUMIF?

They contribute 0 to the sum target after coercion logic.

Can SUMIF use wildcard criteria like * and ??

Yes. Text criteria support wildcard matching semantics.

Implementation

Engine source

On this page