The SUMIF formula in Excel is a powerful tool that allows users to sum values based on a single condition.
The syntax is straightforward: =SUMIF(range, criteria, [sum_range]).
The range is the set of cells that Excel evaluates according to the provided criteria. If the sum_range is omitted, Excel will sum the cells within the range itself.
Basic Usage of SUMIF
For instance, let’s say you have product sales data that lists Iphone, Samsung and One Plus with their corresponding sales amounts.
To calculate the total sales of Iphone, you would use the formula: =SUMIF(A2:A5, “Iphone”, B2:B5).
In this case, the result will be 320, as it combines the sales of 100 and 220 for Iphones.
A
B
Product
Sales
Iphone
100
Samsung
125
Iphone
220
One Plus
150
Advanced Usage with Comparison Operators
You can also utilize comparison operators in the SUMIF function.
Suppose you have a list of names and their corresponding marks, and you want to sum marks that are greater than 70.
The formula would be: =SUMIF(B2:B4, “>70”). The result would be 160, adding together 75 and 85.
A
B
Name
Marks
Dinesh
75
Avinash
85
Roshan
60
Moreover, it’s worth noting that you can reference other cells in your criteria or employ wildcard characters for flexible matching. For example Iphone Table, =SUMIF(A2:A5, C1, B2:B5), where C1 contains