Subtotal by item type using SUMIF

April 10, 2022

If you need to subtotal numbers by type, you can easily do so using the SUMIF function. You can also look at this article if you need to sum items by date.

How to sum orders by item type

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(orders,item,amount)
or
=SUMIF(B9:B19, B2, C9:C19)

The SUMIF function uses three arguments: range, criteria, and sum_range. In our example these arguments are:
range: B9:B19, also named orders - this is the set of cells where SUMIF will apply the criteria
criteria: B2, also named item - this is the value SUMIF will try to find in the range
sum_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.

About me
Radu from ExcelExplained

My name is Radu Meghes, and I'm the owner of excelexplained.com. Over the past 15+ years, I have been using Microsoft Excel in my day-to-day job. I’ve worked as an investment and business analyst, and Excel has always been my most powerful weapon. Its flexibility and complexity make it a highly demanded skill for finance employees. I launched excelexplained.com back in 2017, and it has become a trusted source for Excel tutorials for hundreds of thousands of people each year.

If you'd like to get in touch, you can contact me on LinkedIn.

Thousands of people have benefited from my free Excel lessons. My only question is, will you be next?

Essential Functions

Popular Articles

Excel is a very complex application, and understanding it on your own may prove difficult and time-consuming. I have created ExcelExplained.com to help you better understand each function and provide useful examples for different tasks. If you can’t find the answer to your question in one of the published articles, please leave a comment or send me an email, and I will do my best to help you out.

Affiliate Disclosure: When you purchase a product through a link on our website, I may earn an affiliate commission. There are no additional costs to you.
Copyright © 2017-2022 ExcelExplained.com
>