SUMIF() – Adds numbers in a range that meet a specified condition

The SUMIF() function sums the values in a range that meet a specific criterion or condition. Only the numbers within the range that satisfy the condition are included in the sum.

Syntax

SUMIF(range, "condition")

  • range: The range of cells that you want to evaluate against the condition and from which to sum the numbers if the condition is met (e.g., T1A1:T1A10).
  • condition: The criterion in the form of a number, expression, or text that defines which cells will be summed. It must be enclosed in double quotes (e.g., ">50", "100", "<=0").

Basic example

SUMIF(T1A1:T1A10, ">50")

This formula sums all numbers in the range T1A1:T1A10 that are greater than 50.


Example outputs:

  • If cells T1A1:T1A10 contain [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]:
    SUMIF(T1A1:T1A10, ">50")400 (60+70+80+90+100)
  • If cells T1A1:T1A5 contain [5, "Text", 15, 0, 10]:
    SUMIF(T1A1:T1A5, "<10")5 (sums 5 and 0; "Text" is ignored).
    SUMIF(T1A1:T1A5, "==15")15 (sums cells equal to 15).

Supported operators for conditions

Conditions use standard comparison operators:
> (greater than)
>= (greater than or equal to)
< (less than)
<= (less than or equal to)
== (equal to)
!= (not equal to)

Key features

  • Conditional summation: Adds only those numbers in the range that meet the specified condition.
  • Single range: The same range is used for both evaluating the condition and for sourcing the numbers to sum.
  • Text and empty cells: Non-numeric cells (text, empty) in the range are ignored when checking numeric conditions and are not included in the sum.

Practical uses

  • Summing all sales figures that exceed a certain target value.
  • Totaling expenses for items that are less than or equal to a specific budget amount.
  • Accumulating scores that are above an average or pass mark.
  • Summing specific numeric entries, e.g., all instances of the number 100 in a list.

Common mistakes

  • Condition not in quotes: The condition argument must always be enclosed in double quotes (e.g., use ">50", not >50).
  • Numbers formatted as text: If numbers within the range are stored as text and MathGrid doesn't automatically convert them for the condition check or sum, they will be ignored.

Report issue

Features, Pricing, Documentation, Support, Login

MathGrid ©

Features,
Pricing,
Documentation,
Support,
Login

MathGrid ©

Back to top Arrow