How to use the SUMIF function within a formula in Excel
In this example, all the sales of different restaurant branch regions have to be summed up. You can use the SUMIF function to add all cells in a range, specified by a given criteria.
Here is the syntax for the function: SUMIF(range, criteria, sum_range)
Range: A range of cells to be evaluated.
Criteria: The criteria that specifies which cells to add. This can be a number, expression, or text.
Sum Range: The actual cells to be summed.
How to use the SUMIF Function to sum specified data
- In cells A2:A10 enter a Region number. In this example, we’ll use numbers from 1 - 3.
- List all Branch names in cells B2:B10.
- In cells C2:C10 enter the Monthly sales for each branch.
- List the region numbers used in cells E2:E4.
- Select cells F2:F4 and type the following formula: =SUMIF($A$2:$A$10,E2,$C$2:$C$10).
- Press Ctrl+Enter.
You should now be set! This works for Excel 97, 2000, 2003 and 2007.
