Let’s take a look.
TheSUMIF functionsums cells that satisfy a single condition that you supply.
It takes three arguments: range, criteria, and sum range.
Note that sum range is optional.
If you don’t supply a sum range, SUMIF will sum the cells in range instead.
Excel then returns “30” because two cells in the range contain “15”.
If I temporarily enter another 15, that result will change.
you could add logical operators to the criteria.
you could easily move the criteria out onto the worksheet so that it’s easier to change.
Notice that I need to enclose the operator in double quotes and use the ampersand to concatenate the reference.
The sum range is E7:E12.
Note that SUMIF is not case-sensitive and returns “15”.
you’ve got the option to use empty double quotes to sum blanks.
SUMIF also supports wildcards.
Four question marks will cause SUMIF to match pear because it’s the only item with four characters.
you could use SUMIF with dates as well.
The first example sums amounts for dates that are greater than January 1, 2013.
The next three examples use SUMIF to sum amounts for dates before 2012.
The first formula uses the full date.
The second formula uses theDATE functionto get the same result.
Note the concatenation between the operator and DATE.
Notice that sort order does not affect the SUMIF calculation.