Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu Show menu

SUMIF function

Description

SUMIF(operator, value, range) calculates the sum of the values in range that satisfy a comparison condition.

Each number in range is compared with value, and if the comparison is true, the number is added to the sum.

The comparison operator can be any of the following:

=Equal to
<Less than
>Larger than
<=Less then or equal to
>=Larger then or equal to
<>Different from

The argument range can be a list of numbers, cell addresses, cell ranges (such as A1:A10).

Range can also be a matrix. In that case the function returns a matrix with one row and the same number of columns, with each element the SUMIF of the corresponding column. If range is a row matrix, it is converted to a column matrix first.

Example

SUMIF("<",10,A1:A5) calculates the sum of all cells in range A1:A5 that have a value less then 10.

Calculator

SUMIF ,  ,  ,  ,  ,  

Related functions

  • COUNTIF function: conditional Count function
  • SUM function: computes the sum of the contents of the cells in the specified range
  • SUMNEG function: returns the of all negative numbers
  • SUMPOS function: returns the sum of all positive values
  • List of Statistical spreadsheet functions