If you spend much time working with Excel formulas, you’ll start to run into theSUMPRODUCT functiona lot.

SUMPRODUCT seems to be the catch-all, do-all, go-to solution for many seemingly unrelated Excel problems.

Why is SUMPRODUCT in so many Excel formulas?

Basic SUMPRODUCT example

If this concept is new to you,this video provides a basic overview.

The SUMPRODUCT function

The purpose of SUMPRODUCT is to calculate the sum of products.

Notice we are providing C5:C9 asarray1and D5:D9 asarray2.

Basic SUMPRODUCT example

So far, so good.

SUMPRODUCT performs a useful calculation, but there seems to be nothing special about it.

The formula evaluates like this:

After multiplication, there is just one array given to SUMPRODUCT asarray1.

Basic SUMPRODUCT example

The final result is exactly the same as the original formula.

When separate arguments are used, SUMPRODUCTmultipliesarguments, whichworks like AND logic in Boolean algebra.

This is becausethese functions require rangesand can’t use arrays directly.

Basic SUMPRODUCT example

Examples:Count birthdays by year,Sum by year.

When SUMPRODUCT is given one array, it simply returns a sum.

Recall that multiplying the two ranges together is an “array operation”.

Basic SUMPRODUCT example

It turns out that SUMPRODUCT is in asmall group of functionsthat can handle most array operations natively.

Note: in the example above, we are using just oneargument.

When only one argument is provided, both SUM and SUMPRODUCT return a sum.

SUMPRODUCT with array operation

With more than one argument, SUM and SUMPRODUCT have different behaviors.

SUM returns a sum, while SUMPRODUCT returns the sum of products.

SUMPRODUCT avoids this problem.

SUM function with array operation - Excel 2010 incorrect result

It also avoids the need to explain Control + Shift + Enter, which is a complicated topic.

The array from LEN is returned to SUMPRODUCT asarray1:

And SUMPRODUCT returns 24 as a final result.

This formula needs no special handling; it will work in any version of Excel.

SUM function with array operation Excel 365

This confirms the formula wasnotentered withCSE.

The curly braces in the formula bar confirm the formula was entered with Control + Shift + Enter.

Do not add curly braces manually or the formula will not work.

SUMPRODUCT with the LEN function

This has made SUMPRODUCT the go-to solution for tricky problems over the years.

InExcel 365and Excel 2021 the formula enginehandles arrays natively.

Workbook note

The attached workbook below contains the examples used in the article above.

SUM function with the LEN function

Look for the curly braces in the formula bar, and notice they disappear if you edit the formula.

To see the formula fail without this special handling, re-enter the formula normally (i.e.

don’t use Control + Shift + Enter).

SUM function in Excel 2010 incorrect result

SUM function in Excel 2010 correct result

Basic SUMPRODUCT example

SUMPRODUCT with array operation

SUM function with array operation - Excel 2010 incorrect result

SUM function with array operation Excel 365

SUMPRODUCT with the LEN function

SUM function with the LEN function

SUM function in Excel 2010 incorrect result

SUM function in Excel 2010 correct result