While the regular SUM function adds up all the values in a given range, SUMIF restricts the values which you would like to sum in a given range. The Structure of a SUMIF is: =SUMIF (range, criteria, [sum_range]).
Where range is the column which has a restrictive quality, criteria is the condition for the data to follow, and sum_range is the range of values to sum IF it passes said condition.
The condition may use comparison operands (<, >, =,<> (not equals)) or strings of characters, both in quotations.
For example, consider the chart below:
To find the number of total pairs of shoes in the store we would simply use the SUM function over the entire “quantity” column. However to find the number of red pairs of shoes only, we would use SUMIF as shown below.