The SUMIF function sum values from a range of cells using a condition. In simple words, it sum numbers from a range which meets specific criteria.

You need to define a range to check for criteria and a corresponding range of values which you want to sum.

SUMIF(range, criteria, [sum_range])

*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 a function.**[sum_range]**A cell range which has the values you want to sum.

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

You can also insert criteria directly into the function.

In the below example, we have used an asterisk to specify a criterion which has an alphabet "S".

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

Download this sample file from here to learn more.

- The size of criteria range and SUM range does have to be same. It will always consider cells according to criteria range.
- You can also use wildcard characters with SUMIF.
- You can only able to sum values on the basis of a single criterion. And, if you want to define more than one criteria you can use SUMIFS for that.
- If you want to specify criteria in the form of text, you have to use double quotation marks.
- If you skip specifying SUM range it will sum the values from criteria range which meet the criteria.
- You can only specify criteria up to 255 characters.

*This function is the part of our **top 100 functions list** and here are some **useful formulas** which you can learn today.*