ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Formula > SUMIFS Limitations and Solutions

SUMIFS Limitations and Solutions

SUMIFS Limitations and Solutions
Table of contents :
  • Multiple OR Criteria in the Same Column
    • Solution #1, SUMIF Function, OR Function and Helper Column
    • Solution #2, SUMPRODUCT Function and Array Formula
    • Solution #3, SUM Function and Array Formula
  • Another Question for Multiple OR Criteria in the Same Column
  • Multiple OR Criteria in Different Column
    • Solution #1, SUMIF Function, OR Function and Helper Column
    • Solution #2, SUMPRODUCT Function and Array Formula
    • Solution #3, SUM Function and Array Formula
  • Which One is the Best Solution?

SUMIFS Limitations and Solutions

“How to Use the Excel SUMIFS Function” article explains SUMIFS has limitations, i.e., unable to handle multiple OR criteria, either in the same or different columns.

There are data such as the image below.

SUMIF Multiple Criteria

The following are questions could not be solved by SUMIFS function

Multiple OR Criteria in the Same Column

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

Solution #1, SUMIF Function, OR Function and Helper Column

This solution takes advantage of the helper column as a place to analyze all criteria using OR function.

Once all criteria have been analyzed, it’s easy for the SUMIF function to answer the question. Just looking for the TRUE value in the helper column and add up the sales data.

Here is the formula for the helper column

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

* the DATEVALUE function converts text data into date data.

The result is as shown below

Excel SUMIF Multiple Criteria

The value in the helper column will be TRUE if the sale date is before July 2, 2018, or after July 4, 2018.

The next step is easy. Just use the SUMIF function, helper column as range argument and TRUE as criteria argument.

Here is the formula.

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

SUMIF Multiple Columns

The result is 52.002

Solution #2, SUMPRODUCT Function, and Array Formula

This solution uses no helper column, but the array formula to analyze multiple OR criteria. Here is a formula using the SUMPRODUCT function and an array formula

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

The result is as shown below

SUMIF Two Criteria

How does this formula work?

The core of the above formula is on the section

((C2:C14<DATEVALUE("7/2/2018"))+(C2:C14>DATEVALUE("7/4/2018"))>0)

This section analyzes 2 OR criteria. Let’s describe one by one.

Edit the formula above, block C2:C14<DATEVALUE(“7/2/2018”) section, then press the F9 button. The results are as shown below.

SUMIF Multiple Criteria Different Columns

Appears 13 TRUE/FALSE values in a curly bracket, this section analyzes the first criteria, whether the sale date is smaller than July 2, 2018. There are two sales data both on July 1, 2018. See the image above, TRUE value position in accordance with the data position.

Block C2:C14>DATEVALUE(“7/4/2018”) section, then press the F9 button. The results are as shown below.

Multiple SUMIF

There are another 13 TRUE/FALSE values, this section analyzes the second criteria, whether the sale date is greater than July 4, 2018. There are five sales data; the TRUE value position corresponds to the data position.

Block the results of the first and second criteria; both are connected by the addition operator “+”, then press the F9 key.

SUMIF 2 Criteria

The result is as shown below

Excel SUMIF Multiple Columns

Why the result turned into 13 numbers 0 and 1, as explained in the “How to Use OR Function” article, the TRUE/FALSE value will be converted to 1/0 if involved in mathematical operations. 26 TRUE/FALSE values above are involved in addition operation “+”.

Here are the illustrations

SUMIF Between Dates

If the addition result is greater than 0, then one of the criteria is met, just as the results of the OR function.

The next step is to check whether the addition result is greater than 0. Block 13 numbers 0 and 1 in curly brackets and a “>0” sign.

The result is as shown below

SUMIF Multiple Conditions

Another 13 TRUE/FALSE values appear. Pay attention to the thirteen data; the TRUE value position is the same as the data position by sales date before July 2, 2018, or after July 4, 2018. The bottom line is this is the result of multiple OR criteria.

Block E2:E14 section, then press F9 key. The results are as shown below.

SUMIF Multiple Ranges

13 numbers appear, just like the numbers in the range E2: E14. Block all numbers and TRUE/FALSE values; both are connected by the multiplication operator “*”, then press the F9 key.

SUMIF Excel Multiple Criteria

The result is as shown below,

SUMIF Date Criteria

As a result, 13 numbers partly remain unchanged and partially changed to 0.

Why would this happen? Like the previous explanation, the TRUE/FALSE value will be converted to 1/0 if involved in mathematical operations, the TRUE/FALSE values above involved in the multiplication operation.

Here’s an illustration.

Excel SUMIF Date Range

The number 0 appears because the sale date does not meet the criteria, in other words, a non-zero number is sales before July 2, 2018, OR after July 4, 2018.

Finally, the SUMPRODUCT function will add up all the numbers. There is no need to press the CTRL + SHIFT + ENTER button to finish formula writing, because of the SUMPRODUCT function can handle array data.

For more details, please see the following video tutorial

Solution #3, SUM Function and Array Formula

This solution is similar to solution #2, but the SUMPRODUCT function is replaced by SUM function.

The formula

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

SUM function unable to handle the array data, finish the formula writing by pressing the CTRL+SHIFT+ENTER button simultaneously.

Note: the array formula successfully created If there is a curly bracket at the beginning and the end of the formula.

For more details, please see the video tutorial below.

Another Question for Multiple OR Criteria in the Same Column

How much are the total sales of the “West” and “East” areas?

Solution #1, SUMIF Function, OR Function and Helper Column

The formula for the helper column.

=OR(A2="West",A2="East")

The formula for the total sales of the “West” and “East” areas.

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

The result is as shown below

Excel SUMIF Multiple Conditions

Solution #2, SUMPRODUCT Function, and Array Formula

The formula

=SUMPRODUCT((E2:E14)*((A2:A14="West")+(A2:A14="East")>0))

The result

SUMIF Date Range

Solution #3, SUM Function and Array Formula

The formula

=SUM((E2:E14)*((A2:A14="West")+(A2:A14="East")>0))

The result

SUMIF Between Two Dates

Multiple OR Criteria in Different Column

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

Weird question :D, but this question to show there is a solution for multiple OR criteria in a different column.

Solution #1, SUMIF Function, OR Function and Helper Column

The formula for the helper column

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

The formula for the total sales of the “East” area OR “iPhone X”

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

For more details, please see the following video tutorial.

Solution #2, SUMPRODUCT Function, and Array Formula

The formula

=SUMPRODUCT((E2:E14)*((A2:A14="East")+(B2:B14="iPhone 6")>0))

How does the formula work? Please see the following video tutorial.

Solution #3, SUM Function and Array Formula

The formula

=SUM ((E2:E14)*((A2:A14="East")+(B2:B14="iPhone 6")>0))

How does the formula work? Please see the video tutorial below.

Which One is the Best Solution?

If the helper column does not matter for you, then solution #1 is the best, simple but solve the problem.

If you want no helper column solution, then the choice is to use an array formula. The next question uses the SUMPRODUCT function or the SUM function.

The SUMPRODUCT function by default can handle an array formula, so no need for CTRL+SHIFT+ENTER button to finish the formula. For me, this is better.

Which one is your choice?

There is another solution, simple with no helper column, i.e., use the solution #1. What about the helper column? Just hide it using “Hide column” menu :D, simple with no helper column, right? 😀

Related Function

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

Related Articles

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

How to Do Division in Excel

Add remove leading zeros in excel
Add Leading Zeros in Excel Add Leading Zeros for Numeric …

Add and Remove Leading Zeros in Excel

How to Merge Cells in Excel
There are several ways to merge cells in excel, using …

How to Merge Cells in Excel

Excel Divide by Zero
Pay attention to the data below. A store sells five …

Excel Divide by Zero Error

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

Tags:Array Formula DATEVALUE Function Excel Formula SUMIF Between Two Dates Excel SUMIF Between Dates Excel SUMIF Date Range Excel SUMIF Multiple Columns Excel SUMIF Multiple Conditions Excel SUMIF Multiple Criteria Multiple SUMIF OR Function SUM Function SUMIF 2 Criteria SUMIF Between Dates SUMIF Between Two Dates 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 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 © 2023 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