Today’s topic is the formula SUMIF.
Sumif is a powerful formula that allows you to quickly add values given certain criteria. I know that sentence didn’t make a ton of sense, so let’s just skip to the example. You’ll need the example spreadsheet which you can download here. (SPOLIER ALERT! Next week we will be looking at COUNTIF and using the same spreadsheet, so save this document).
In the spreadsheet there is a list of salespeople and their sales. Each line in the list is a unique sale. What we would like to see is the total sales amount for each salesperson. Using SUMIF we are going to write a single formula that will accomplish our task.
Start by placing your cursor into cell F3 and type: =SUMIF(
You should see this below where you are typing:
As you can see there are two required inputs in the formula and one optional input (Bonus Tip! anytime a formula input is listed in brackets as you see above, it means the input is optional. Excel will either figure it out for you or it has a default value programmed into the formula)
Range is the range of cells you want evaluated. In our case this is the list of salesman and their sales.
Criteria is the condition or criteria that defines which cells will be added.
[Sum_range] is the actual cells to be added. If omitted, Excel will try to find these cells itself.
Here is the formula you should type in: =SUMIF($B$3:$B$98,E3,$C$3:$C$98). A few things you should notice:
- The absolute cell references. Those are important because it allows us to copy the formula to the other cells.
- Even though the “sum_range” is optional, I gave the formula an input. I have not found that Excel does a great job figuring out the sum cells on its own. I almost never leave “sum_range” blank.
- Remember named ranges? If my list of sales had been named something like, “SalesList” then I could have written the formula this way: =SUMIF(SalesList, E3, $C$3:$C$98)
After you’ve copied the formula to all the salespeople, your final product should look like this: