How to sum orders by item type
Our workbook contains the same data from our previous COUNTIF example, where we wanted to know how many orders were placed that contained a certain item. In this worksheet, cell C2 contains the following formula:
=SUMIF(B9:B19, B2, C9:C19)
The SUMIF function uses three arguments: range, criteria, and sum_range. In our example these arguments are:
B9:B19, also named
orders – this is the set of cells where SUMIF will apply the criteria
B2, also named
item – this is the value SUMIF will try to find in the range
C9:C19, also named
amount – the set of cells that will be summed by SUMIF when the provided criterion is TRUE
You can download the Excel workbook if you want to take a closer look at the formula.
The example from this article works in Excel for Microsoft 365 or Excel 2019, 2016, 2013, 2010, and 2007.
If you have additional questions, please let me know by posting a comment.