ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Formula > SUMIF Multiple Criteria

SUMIF Multiple Criteria

SUMIF Multiple Criteria
Table of contents :
  • SUMIF Multiple Criteria Same Column (AND Operator)
  • SUMIF Multiple Criteria Same Column (OR Operator)
  • SUMIF Multiple Criteria Different Column (AND Operator)
  • SUMIF Multiple Criteria Different Column (OR Operator)
  • SUMIF Multiple Criteria Different Column (AND/OR Operator)
  • The Conclusion

SUMIF Multiple Criteria

For example, there are data such as the image below.

SUMIF Multiple Conditions

How does the SUMIF function answer the following multiple criteria questions, either in the same or different columns, either with AND, OR operator or both?

SUMIF Multiple Criteria Same Column (AND Operator)

The Question

How much is the total sales for July 2, 2018, until July 4, 2018?

The Criteria

  • Criteria #1, sale date >= July 2, 2018
  • Criteria #2, sale date <= July 4, 2018

Both criteria must be met (AND Criteria)

The Formula

The formula for helper column

=AND(C2>=DATEVALUE("7/2/2018"),C2<=DATEVALUE("7/4/2018"))

The formula for total sales

=SUMIF(F2:F14,TRUE,E2:E14)

The Result

Excel Formula SUMIF between Two Dates

Another Solution

You can use the SUMIFS function to answer this question. The video tutorial below explains how to use the SUMIFS function to answer the questions above.

SUMIF Multiple Criteria Same Column (OR Operator)

The Question

How much are the total sales before July 2, 2018, and after July 4, 2018?

The Criteria

  • Criteria #1, sale date < July 2, 2018
  • Criteria #2, sale date > July 4, 2018

Only one criterion must be met (OR Criteria)

The Formula

The formula for helper column

=OR(C2<DATEVALUE("7/2/2018"),C2>DATEVALUE("7/4/2018"))

The formula for total sales

=SUMIF(F2:F14,TRUE,E2:E14)

The Result

Excel SUMIF Multiple Criteria

Another Solution

You can use the SUMPRODUCT function and array formula to solve this question.

An alternative to the SUMPRODUCT function is to use the SUM function and array formulas.

SUMIF Multiple Criteria Different Column (AND Operator)

The Question

How much are the total sales of the iPhone X in West area?

The Criteria

  • Criteria #1, Area = “West”
  • Criteria #2, iPhone variant = “iPhone X”

Both criteria must be met (AND Criteria) and are in different columns.

The Formula

The formula for helper column

=AND(A2="West",B2="iPhone X")

The formula for total sales

=SUMIF(F2:F14,TRUE,E2:E14)

The Result

SUMIF Multiple Columns

Another Solution

The SUMIFS function answer this question easily. The following video tutorial explains how to use the SUMIFS function.

SUMIF Multiple Criteria Different Column (OR Operator)

The Question

How much are the total sales of “East” area OR “iPhone 6”?

Strange question :D, but there is a solution for multiple OR criteria questions in a different column.

The Criteria

  • Criteria #1, Area = “East”
  • Criteria #2, iPhone variant = “iPhone 6”

Both criteria do not have to be met all (OR Criteria) and are in different columns if one of the criteria is met then EXCEL will calculate the sales data.

The Formula

The formula for helper column

=OR(A2="East",B2="iPhone 6")

The formula for total sales

=SUMIF(F2:F14,TRUE,E2:E14)

The Result

SUMIF Two Criteria

Another Solution

The SUM function and array formula can solve this question.

Use the SUMPRODUCT function and array formula for other alternatives.

SUMIF Multiple Criteria Different Column (AND/OR Operator)

The Question

How much is the total sales for July 2, 2018, until July 4, 2018, in the West and East Area?

The Criteria

  • Criteria #1, sale date >= July 2, 2018
  • Criteria #2, sale date <= July 4, 2018
  • Criteria #3, area = “West”
  • Criteria #4, area = “East”

Criteria #1 and criteria #2 must be met all (AND Criteria), criteria #3 and criteria #4 do not have to be fulfilled all (OR Criteria). Both groups of criteria must be TRUE so that the sales data is calculated.

The Formula

Formula for helper column

=AND(AND(C2>=DATEVALUE("7/2/2018"),C2<=DATEVALUE("7/4/2018")),OR(A2="West",A2="East"))

Formula for total sales

=SUMIF(F2:F14,TRUE,E2:E14)

The Result

SUMIF Excel Multiple Criteria

Another Solution

Please use array formula for no helper column solution, using the SUMPRODUCT function or the SUM function is the same result.

The difference, the SUM function cannot handle array formulas by default. If you use the SUM function, end formula writing by pressing CTRL + SHIFT + ENTER key simultaneously

SUMPRODUCT Function and Array Formula

The Formula

=SUMPRODUCT((E2:E14)*(((C2:C14>=DATEVALUE("7/2/2018"))*(C2:C14<=DATEVALUE("7/4/2018"))=1)*((A2:A14="West")+(A2:A14="East")>0)))

The Result

SUMIF Multiple Criteria Different Columns

SUM Function and Array Formula

The Formula

=SUM((E2:E14)*(((C2:C14>=DATEVALUE("7/2/2018"))*(C2:C14<=DATEVALUE("7/4/2018"))=1)*((A2:A14="West")+(A2:A14="East")>0)))

The Result

Excel SUMIF Multiple Conditions

The Conclusion

  1. The formula for total sales in all questions is the same; the difference is the formula in the helper column, all of them use logical functions adjusted to a variety of questions
  2. Another solution for multiple AND criteria is SUMIFS function
  3. Another solution for multiple OR criteria is an array formula

Related Function

Function used in this article
  • Excel SUM Function
  • Excel SUMPRODUCT Function
  • Excel SUMIF Function
  • Excel SUMIFS Function
  • Excel OR Function
  • Excel AND Function
  • Excel DATEVALUE Function
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

How to Separate Date and Time in Excel
The date and time value can be written in one …

How to Separate Date and Time in Excel

How to Subtract Multiple Cells from One Cell in Excel
For example, there are data such as the image below. …

How to Subtract Multiple Cells from One Cell in Excel

How to add days, weeks, months, years to date in Excel
How to add DAYS to a date in Excel Excel …

How to Add Days, Weeks, Months and Years to a Date in Excel

Combine Separate First and Last Name in Excel
How to Combine First and Last Name in Excel How …

How to Combine and Separate First and Last Name in Excel

How to Do Division in Excel
How to divide in Excel? For example, there is data …

How to Do Division in Excel

Tags:AND Function Array Formula DATEVALUE Function Excel Formula SUMIF Between Two Dates Excel SUMIF AND Excel SUMIF Between Dates Excel SUMIF Criteria Excel SUMIF Multiple Columns Excel SUMIF Multiple Conditions Excel SUMIF Multiple Criteria Multiple SUMIF OR Function SUM Function SUMIF 2 Criteria SUMIF AND SUMIF Between Dates SUMIF Between Two DatesExcel SUMIF Date Range SUMIF Criteria SUMIF Date SUMIF Date Criteria SUMIF Date Range SUMIF Excel Multiple Criteria SUMIF Function SUMIF Multiple Columns SUMIF Multiple Conditions SUMIF Multiple Criteria SUMIF Multiple Criteria Different Columns SUMIF Multiple Ranges SUMIF OR Criteria SUMIF Two Criteria SUMIF Using Date Range SUMIF Using Dates SUMIFS Function SUMPRODUCT Function

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh