SUMIF Function - Excel


Overview


The SUMIF function in Excel is a useful tool for adding up a range of numbers based on a specified criteria or condition. This function allows you to specify a criteria, and then it adds up the numbers that meet that criteria within a given range.

An example of the SUMIF function in Excel

Example:

=SUMIF(C2:C11, ">8")

Syntax:

=SUMIF(range, criteria, [sum_range])

range: The range of cells that you want to apply the criteria to.

criteria: The condition that determines which cells to include in the sum.

[sum_range]: (Optional) The range of cells to sum. If omitted, the function will use the same range specified in the "range" argument.


Example: without optional [sum_range] input


In the example above, the SUMIF function is looking at range C2:C11 and we gave it a condition to only add up the numbers that are greater than 8. The final output is 19 because it added up the only two numbers that are greater than 8 in that range, which were 9 and 10.


Example: with optional [sum_range] input


In this example, the SUMIF function is looking at range D2:D11 and if any of the rows meet the criteria of equaling “run” then the number in range C2:C11 of that same row will get added up. The final output is 26 because 1, 4, 6, 7, and 8 were added up.

Another example of the SUMIF function in Excel

Interactive GSheet