How Excel's SUMPRODUCT Formula Can Simplify Your Spreadsheets

How Excel's SUMPRODUCT Formula Can Simplify Your Spreadsheets

Never thought Excel's SUMPRODUCT formula could become your go-to formula for complex Lookups?

Think again.

The SUMPRODUCT function is in fact THE function to work smart in Excel. It is an array function but is different than most of Excel’s array functions in that it doesn’t require Ctrl + Shift + Enter (CSE). It wears many hats and has many uses other than the traditional sum of products formula, which the name implies.  It can be used to conditionally SUM, conditionally COUNT and for complex lookup challenges.

Watch this video to find out more about the SUMPRODUCT function. You can get all of it in writing HERE. Download the practice workbook on the page to follow along.

Think you got it? Download the Exercise book from this page (scroll down to the bottom) to test your knowledge.

Here's a Quick Summary

First off let's demonstrate the classical use of SUMPRODUCT. 

This function can be written in two ways which returns the same result. Using either Excel separator “,” (comma) or using the multiply sign “*”. However, when SUMPRODUCT is used in non-classical ways, it is generally necessary to use “*” operator instead of the “,”. I will explain why in a bit.

The side of SUMPRODUCT most people don't know, is it can check for exceptions. You just have to get your brackets rights. The formula becomes:

=SUMPRODUCT(([array1]=condition)*[array2])

Notice, I've replaced the "," with a "*". That's the tricky part: You can't use the suggested "," separator anymore to separate the arguments. If you write this:

=SUMPRODUCT(([array1]=condition),[array2])

You get zero. But if you write this:

=SUMPRODUCT(--([array1]=condition),[array2])

it works. Why?

The double negatives and the multiplication sign have the purpose of forcing Excel to switch Boolean values to 1 and 0 values. Where are the Boolean values? They get generated by this part of the formula:

=SUMPRODUCT(([array1]=condition)...)

This check results in an array of True and False values. The only way to translate True to 1 and False to 0 is by performing some sort of mathematical operation on the array. That's what the double negatives or the multiplication achieve.

More Than Meets the Eye

One of the advantages that SUMPRODUCT has over SUMIFS or COUNTIFS is that it can understand OR conditions besides checking for AND conditions. OR conditions are written in SUMPRODUCT using the “+” operator. AND conditions are denoted using the “*” operator. Using parenthesis to group the AND / OR criteria is crucial for the SUMPRODUCT function to interpret the different criteria groupings properly.

For more examples read this article and download the free workbook.

Mag. Marcel Suppan-Luttenberger

Learning without thinking is for nothing. Thinking without learning is daring (Konfuzius)

8y

Hi Leila, you did a good presentation and professional explanation. good job.

Like
Reply
Doynell Rijkaard

Data Analytics & AI transformation leader | Investor | Strategy | Business Development | Founder

8y

Great stuff Leila and a valuable refresher 👍🏽😃

Anthony Newell

Microsoft Power BI Lead / SME / Evangelist

8y

Understanding this is good background to approaching iterator functions in DAX like SUMX

Alex Powers

Senior Program Manager at Microsoft

8y

Technically it's called Double Unary, not double negative but great article :)

Darren Lefcoe

Trading, Coding, Maths and Physics

8y

also curly braces for array, but good article!

To view or add a comment, sign in

More articles by Leila Gharani

  • Dynamic WordArt in Excel (with bar-in-bar chart)

    Dynamic WordArt in Excel (with bar-in-bar chart)

    Can you conditionally format WordArt in Excel? When I received this question, I thought it's going to be a fun one to…

    18 Comments
  • How do I Create a Chart in Excel?

    How do I Create a Chart in Excel?

    Are you overwhelmed with Excel's Chart options? If yes, this tutorial is for you. You'll learn: How to insert an Excel…

  • Are you using this custom formatting trick in Excel?

    Are you using this custom formatting trick in Excel?

    Here is an Excel question for you: Do you think the up/down arrows in the report below are created using custom…

    8 Comments
  • Quick Gantt Chart in Excel

    Quick Gantt Chart in Excel

    Gantt charts are great for visualizing and presenting your project plan. Excel doesn't have a built-in Gantt chart…

  • 5 Design Tips for Better Excel Reports

    5 Design Tips for Better Excel Reports

    (scroll down for video) #1 Contrast Add a strong contrast to headings to show at a glance what your report is about…

    3 Comments
  • Better Variance Charts in Excel: 4 Ways

    Better Variance Charts in Excel: 4 Ways

    You've been asked to visualize actual sales by company. You have a couple of companies.

    2 Comments
  • 3 ways to lookup values in Excel when you have more than one header per column

    3 ways to lookup values in Excel when you have more than one header per column

    In the last article I covered the basics behind INDEX & MATCH - If you'd like to brush up on that, make sure you check…

    2 Comments
  • How to do Complex Lookups in Excel

    How to do Complex Lookups in Excel

    Have you ever come across a case where you needed to lookup a value in a table but had multiple table headers? In this…

  • Say Goodbye to VLOOKUP

    Say Goodbye to VLOOKUP

    The most searched Excel formula on Google and YouTube is VLOOKUP. It makes sense.

    10 Comments
  • How to Create Info-Charts in Excel

    How to Create Info-Charts in Excel

    I'm not really sure what to call this chart: non-standard bar chart, Info-chart or rounded bar chart - someone said…

    12 Comments

Insights from the community

Others also viewed

Explore topics