Excel SUMIF Function for Multiple Criteria (3 Easy Methods)

While working with large amounts of data in Excel, sometimes you need to sum a column with criteria. In order to sum with criteria, we use the SUMIF function. Now, if you find yourself in a situation where you need to sum a column or row with multiple criteria, you can also use the SUMIF function. So, in this tutorial, we are going to show you how to use the SUMIF function with multiple criteria in Excel.


Excel SUMIF Function: Overview

  • Summary:

The SUMIF function sums the values in a range that meets the criteria that you specify. We Use the SUMIF function in Excel to sum cells based on numbers that meet specific criteria.

  • Syntax:

The syntax of the SUMIF function is as follows:

=SUMIF (range, criteria, [sum_range])

  • Arguments:
Argument Required/Optional Explanation
range Required The range of cells that we want to be evaluated by criteria.
criteria Required The criteria are in the form of a number, expression, a cell reference, text, or a function that defines which cells will be added.
sum range Optional The actual cells to add if we need to combine cells other than those defined in the range argument.
  • Return Value:

This application returns the sum of cells based on numbers that meet specific criteria.

  • Available in Version:

Office 365  ■ Excel 2019 ■ Excel 2016  ■  Excel 2013  ■ Excel 2011 for Mac ■  Excel 2010 ■

Excel 2007.


Now, you can’t directly use the SUMIF function with multiple criteria. Basically, the SUMIF function takes only a single condition. But, we can use the SUMIF function with other functions or methods to solve our problem. To demonstrate this tutorial, we are going to use the following dataset.

sample dataset for Excel SUMIF Function for Multiple Criteria

We are going to find total sales based on some criteria using the SUMIF function. In order to use the SUMIF function with multiple criteria, we are providing you with 3 methods that can truly solve your problem.


1. Combining SUMIF Functions to Apply Multiple Criteria in Excel

Now, the first one is pretty simple to use. As we know, the SUMIF function only takes a single condition. So, we can add multiple SUMIF functions with different conditions. It means we are summing up multiple criteria. Therefore, follow the below steps.

The Generic Formula:

=SUMIF(range,criteria,sum_range)+SUMIF(range,criteria,sum_range)+........

Now, we are going to find the Total Sales of John and Stuart in January.

📌 Steps:

  • First, type the following formula in Cell I5:
=SUMIF(C5:C12,H5,D5:D12)+SUMIF(C5:C12,H6,D5:D12)

adding multiple sumif for multiple criteria

  • Then, press Enter.

result of adding multiple sumif to demonstrate Excel SUMIF Function for Multiple Criteria

  • Consequently, as you can see, we have successfully found the Total Sales of John and Stuart in January.
  • Therefore, you can add more criteria with this method. And easily find the Total Sales of any person or any Product.

🔎 Breakdown of Formula

SUMIF(C5:C12,H5,D5:D12)

Firstly, this function sums up John’s sale in January and returns 1200.

SUMIF(C5:C12,H6,D5:D12)

Then, this function sums up Stuart’s sale in January and returns 700.

SUMIF(C5:C12,H5,D5:D12)+SUMIF(C5:C12,H6,D5:D12)

Finally, our formula adds those values and returns $1900.


2. Joining SUMPRODUCT with SUMIF Function for Multiple Criteria

Now, another way to use the SUMIF function with multiple criteria is using it with the SUMORODUCT function. The SUMPRODUCT function returns the sum of the products of similar ranges or arrays. The default method is multiplication, but you can also add, subtract and divide with this function. Now, we will use the multiple criteria as a range in the SUMIF function. After that, it will return an array. Then, our SUMPRODUCT function will add those arrays and return results. So, learn the following process.

The Generic Formula:

=SUMPRODUCT(SUMIF(range,criteria_range,sum_range))

Now, we want to find the Total Sales of all the salespeople in March.

📌 Steps:

  • First, type the following formula in Cell J5:
=SUMPRODUCT(SUMIF(C5:C12,I5:I7,F5:F12))

sumproduct function with sumif for multiple criteria

  • Then, press Enter.

Excel SUMIF Function for Multiple Criteria

  • Hence, as you can see, we are successful in finding the total sales of all the salespeople in March.
  • In our opinion, this formula is more efficient than the previous one if your criteria come from a particular column.
  • Finally, you can easily pass those criteria as a range in the SUMIF function.

🔎 Breakdown of Formula

SUMIF(C5:C12,I5:I7,F5:F12)

First of all, this function will return an array: {1300;700;1200}

SUMPRODUCT(SUMIF(C5:C12,I5:I7,F5:F12))

Finally, SUMPRODUCT will add those arrays and return $3200.


3. Merging Excel SUM and SUMIF Functions to Apply Multiple Criteria

Now, by combining the SUM and SUMIF functions we can perform this with multiple criteria. This function is almost similar to the 1st method. The basic difference is we are using the SUM function instead of the plus sign (+). Therefore, learn the following steps.

The Generic Formula:

=SUM(SUMIF(range,criteria2,sum_range1),SUMIF(range,criteria2,sum_range2).......)

We want to find the total sales of the product Book in February and total sales of the product Pen in January.

📌 Steps:

  • First of all, type the following formula in Cell I5:
=SUM(SUMIF(B5:B12,H5,E5:E12),SUMIF(B5:B12,H6,D5:D12))

formula using SUM and SUMIF functions together

  • Then, press Enter.

result of SUM and SUMIF functions together

  • Finally, you can see we are successful in finding the total sales of the product Book in February and total sales of the product Pen in January.

🔎 Breakdown of Formula

SUMIF(B5:B12,H5,E5:E12)

Firstly, this function will return 1000.

SUMIF(B5:B12,H6,D5:D12)

Then, this function will return 1400.

SUM(SUMIF(B5:B12,H5,E5:E12),SUMIF(B5:B12,H6,D5:D12))

Finally, the SUM function will add those values and return $2400.

Read More: SUMIF and VLOOKUP Functions Across Multiple Sheets in Excel


Excel SUMIFS Function for Multiple Criteria

Now, this part is a bonus for you. In order to sum up multiple criteria, you can use the SUMIFS function. This function takes multiple criteria. If you don’t want to use complex methods or formulas, this function will work with ease. This function sum cells that meet multiple criteria.

The Basic Syntax of the SUMIFS Function:

  • Function Objective:

Add the cells given by specified conditions or criteria.

  • Syntax:
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

  • Arguments Explanation:
Arguments Required/Optional Explanation
sum_range Required Range of cells that has to be summed under conditions or criteria.
criteria_range1 Required Range of cells where the criteria or condition will be applied.
criteria1 Required Condition for the criteria_range1.
[criteria_range2] Optional 2nd range of cells where the criteria or condition will be applied.
[criteria2] Optional Condition or criteria for the criteria_range2
  • Return Value:

The sum of the cells in a numeric value meeting all given criteria.

  • Available in Version:

Office 365  ■ Excel 2019 ■ Excel 2016  ■  Excel 2013  ■ Excel 2011 for Mac ■  Excel 2010 ■

Excel 2007.

Now, We want to find the total sales of Stuart in January greater than $150.

📌 Steps:

  •  First, type the following formula in Cell I7:
=SUMIFS(D5:D12,C5:C12,I4,D5:D12,">150")

SUMIFS function with multiple criteria

  • Then, press Enter.

result of SUMIFS function

  • In the end, we are successful in finding the total sales of Stuart in January greater than $150.

Read More: How to SUMIF for Multiple Criteria Across Different Sheet in Excel


SUMIF vs. SUMIFS in Excel

  • The SUMIF function allows only a single criterion, while SUMIFS can handle multiple principles.
  • In SUMIF, the range and sum_range arguments are separate, while in SUMIFS, the sum_range is the first argument followed by pairs of criteria ranges and criteria.
  • SUMIFS requires all rules to be met simultaneously, whereas SUMIF evaluates each criterion individually.
  • SUMIFS offers more flexibility in specifying multiple criteria, making it suitable for complex conditions.

💬 Things to Remember

✎ Firstly, if you are working with a small dataset and single criteria then the SUMIF function will be efficient.

✎ Secondly, if you are working with a large dataset and complex criteria, using the SUMIFS function may be the optimal way.


Frequently Asked Questions

1. Can I combine different criteria types, such as text and numbers, in the “SUMIF” function?

Yes, you can combine different types of rules, such as text and numbers, in the SUMIF function. Excel will evaluate the criteria based on their respective data types.

2. Are there any limitations or considerations when using SUMIF with multiple criteria?

When using SUMIF with multiple rules, keep in mind the following considerations:

  • Each range and criterion pair should be in the same order.
  • The number of ranges and criteria should be the same.
  • The sum_range (range to be summed) must be the last argument in the formula.

3. How do I sum values in Excel based on multiple rules using the “SUMIF” function?

To sum values in Excel based on multiple rules using the SUMIF function, you need to provide alternating ranges and criteria pairs in the formula. The function will only sum the values that meet all the specified criteria.


Download Practice Workbook

Download this practice workbook.


Conclusion

To conclude, I hope you found this tutorial helpful to use SUMIF with multiple criteria. We recommend you learn and apply all these methods to your dataset. Definitely, it will improve your knowledge. Therefore, download the practice workbook and try these yourself. Also, feel free to give feedback in the comment section. Your valuable feedback keeps us motivated to create tutorials like this.


SUMIF Multiple Criteria: Knowledge Hub


<< Go Back to Excel SUMIF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
A.N.M. Mohaimen Shanto
A.N.M. Mohaimen Shanto

A.N.M. Mohaimen Shanto, a B.Sc. in Computer Science and Engineering from Daffodil International University, boasts two years of experience as a Project Manager at Exceldemy. He authored 90+ articles and led teams as a Team Leader, meticulously reviewing over a thousand articles. Currently, he focuses on enhancing article quality. His passion lies in Excel VBA, Data Science, and SEO, where he enjoys simplifying complex ideas to facilitate learning and growth. His journey mirrors Exceldemy's dedication to excellence and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo