SUMIF(range, criteria, [sum_range])
SUMIF computes sum of cells matching a condition.
range is the range of cells that criteria applies to.
criteria is the condition to be applied to the range of values for selection.
sum_range is the range of cells over the sum is to be computed.
Use the SUMIF formula to compute a sum of values over a cell range that meets a criteria. For example, the following expression computes the total sales of all fruits with name matching “
The following picture shows the value being computed:
3. Sum Rows Matching an Expression
Description: Sum of fruits sold with name beginning with “B”
4. Select & Sum Cells Matching a Constant
Description: Sum of fruits sold by “Tom”
5. Select Rows with Condition in a Cell
The criteria need not be a constant. It can be a cell reference. In that case, it would pick up the value from the referenced cell. In the following, we compute salaries during a year where the year comes from cell C19.
6. Cell Containing Expression
Of course, the cell can contain an expression rather than a constant value.
7. Skip Summing Cell Range
Of course if you are summing the same range of cells used for criteria selection, you can skip the last argument.
=SUMIF(E2:E16, "> 1000000")
Use Excel formula SUMIF() to compute a sum of cells which match a specific condition. You can specify a constant or an expression for the matching condition. You can also reference the matching value from a cell.