# SUMIF Function

The SUMIF function is one of the math and trigonometry functions. It is used to add all the numbers in the selected range of cells based on the specified criterion and return the result.

The SUMIF function syntax is:

SUMIF(cell-range, selection-criteria [, sum-range])

where

cell-range is the selected range of cells to apply the criterion to.

selection-criteria is the criterion used to determine the cells to sum, a value entered manually or included into the cell you make reference to.

sum-range is the range of cells to sum. It is an optional argument, if omitted, the function will sum the numbers of cell-range.

Note: you can use wildcard characters when specifying criteria. The question mark "?" can replace any single character and the asterisk "*" can be used instead of any number of characters.

To apply the SUMIF function,

1. select the cell where you wish to display the result,
2. click the Insert Function icon situated at the top toolbar,
   or right-click within a selected cell and select the Insert Function option from the menu,
   or click the icon situated at the formula bar,
3. select the Math and trigonometry function group from the list,
4. click the SUMIF function,
5. enter the required arguments separating them by commas,
6. press the Enter button.

The result will be displayed in the selected cell.