Excel Function: SUMIF

- Written by Puneet

Intro: SUMIF Function

In Excel, when you use the SUMIF function, it returns the sum of the values which meet the condition you specify. You need to specify the range of cells to check for the condition, then a value to check as a condition, and in the end, a range to sum values from. So there are three arguments in it to specify.

Syntax

SUMIF(range, criteria, [sum_range])

Arguments

  • range: A range of cells from which you want to check for criteria.
  • criteria: A criteria which can be a number, text, expression, cell reference, or function.
  • [sum_range]: A cell range that has the values you want to sum.

Example

In the below example, we have specified A1:A9 as the criteria range and B1:B9 as the sum range and after that, we have specified the criteria in A12 which has the value C.

excel-sumif-function-example-1

You can also insert criteria directly into the function. In the below example, we have used an asterisk wildcard to specify a criterion that has the alphabet “S”.

excel-sumif-function-example-2

And, if you skip specifying the sum range it will give you the sum of the criteria range. But, that will be only possible if the criteria range has numeric values.

excel-sumif-function-example-3

Sample File

Download Sample File