It returns the sum of all the cells in a given range that meet a specific criterion.
The syntax of the function is the following:
SUMIF(range, criterion, [sum_range])range: The cells or range of cells we want to calculate the sum for, unless the sum_range argument is defined. If the optional attribute sum_range is defined then range is the range to which we apply the criterion.
criterion: It is the criterion that defines which cells of the range should be included in the calculation of the sum.
[sum_range]: Optional. The actual set of cells to sum. If this argument is omitted the range attribute is used.
If the cells in range are empty or contain logical or text values they are ignored.
If a criterion cell is empty, it is treated as a zero.
You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
Click on the button to practice using this function, with the help of our Online Assessment Tool:
Here are a few examples of how to use the SUMIF function:
Navigate to the SALES worksheet and insert a function in the cell E9 which derives data from the cell range C5:C24, in order to calculate the sum of sales achieved by the salesman Lambropoulos.
Navigate to the cell F4 and use the appropriate function to display the Sum of album sales of Queen.
Use the sumif function in the cell E15 to calculate the total points received by Gladbach .