The name is ad­mit­ted­ly somewhat mis­lead­ing. The function does not give the product (result of a mul­ti­pli­ca­tion) of multiple sums (result of an addition). Instead, the function does the opposite: it ag­gre­gates multiple products to form a total. In Excel, SUMPROD­UCT helps with every­thing from small tables to huge matrices.

How does the SUMPROD­UCT function work?

Whenever you want to multiply several values in Excel and then aggregate the results, the SUMPROD­UCT function is ideal. For example, if you have several matrices in your worksheet and you want to add them together, it’s very easy to do so with SUMPROD­UCT. Let’s assume we have a table with two columns: SUMPROD­UCT lets you multiply the two values in each row with one another and then sum them.

SUMPROD­UCT is a matrix formula. Typically, if you want to use a function as a matrix formula, you have to confirm entry of the formula using the keyboard shortcut [Ctrl] + [Shift] + [Enter]. But you don’t have to do that with SUMPROD­UCT because the function is designed for pro­cess­ing matrices. That is why Excel doesn’t require a special command.

Syntax of SUMPROD­UCT in Excel

The Excel SUMPROD­UCT function has a rel­a­tive­ly simple structure. In general, you only need to specify the range to be included in the cal­cu­la­tion.

=SUMPRODUCT(Array1,[Array2],[Array3]...)

The formula must include at least one array. You can make as many as 256 entries. Excel gives you a range of options to fill the pa­ra­me­ters. You can enter the matrix via a cell reference, reference the required range with a name, or enter an array (a col­lec­tion of values) directly in the formula.

  • Cell range: =SUMPROD­UCT(A2:A6,B2:B6)
  • Name: =SUMPROD­UCT(Array1,Array2)
  • Array: =SUMPROD­UCT({15,27,12,16,22},{2,5,1,2,3})
Note

Firstly, you have to define a name for the array (e.g. “array1”) before you can use it in the function. To do so, select the cor­re­spond­ing range – including a header in which you have already entered the name – and then go to “Formulas and “Create from Selection”.

The cor­re­spond­ing cell ranges must always be sym­met­ri­cal: For example, if the second array contains one row or a value less than the first range, an error message is displayed.

The SUMPROD­UCT function in practice

The SUMPROD­UCT function offers several ad­van­tages. The obvious advantage is that you can save several cal­cu­la­tion steps by linking mul­ti­pli­ca­tion and addition. The SUMPROD­UCT can also be combined with other functions. The function offers several tricks that are in­ter­est­ing for more complex tasks.

SUMPROD­UCT with com­par­i­son

For example, SUMPROD­UCT has a built-in element like the SUMIF function. It lets you choose which values in the matrices are to be added to the cal­cu­la­tion. All you have to do is modify the actual syntax of the function somewhat:

=SUMPRODUCT((A2:A11=A14)*B2:B11*C2:C11)

We have added a com­par­i­son to the first argument. The relevant cells are only mul­ti­plied and added to the total if the details cor­re­spond to the value in cell A14. Besides the equal sign that performs the com­par­i­son, mul­ti­pli­ca­tion signs have been added. In the normal syntax, the ranges can be separated simply using a comma. Excel often already knows how to handle the data. However, if you include a com­par­i­son, the function requires clear iden­ti­fi­ca­tion of the cal­cu­la­tion operation. Otherwise, an error occurs.

Other mul­ti­pli­ca­tion options

You can also use an asterisk for mul­ti­pli­ca­tion. As already mentioned, the function only works if the ranges specified have the same number of cells. However, you may want to multiply by the same value each time. The­o­ret­i­cal­ly, you would have to use an array with the same value in every cell for this. Instead, you can enter the value just once in one row, and then use the “*” in the formula.

=SUMPRODUCT(A1:A10*$B$1)

As another example, let’s assume that you want to add various cells and then multiply them by a value and then sum up the results again. There are two ways to implement this using Excel:

=SUMPRODUCT(A2:C6*D2:D6)

You can use the mul­ti­pli­ca­tion symbol again. The values in the large range are first added to one another, and then mul­ti­plied by the second range.

=SUMPRODUCT((A2:A6+B2:B6+C2:C6),D2:D6)

You can use the comma again in this formula. However, you have to tell Excel ex­plic­it­ly that you want to sum the in­di­vid­ual ranges first.

Combining SUMPROD­UCT with other functions

Of course, the SUMPROD­UCT function can also be combined with other Excel functions. In this way, you can include multiple steps in a single formula and don’t have to use auxiliary cells to store interim results. For example, you can round the result of the function directly. Im­por­tant­ly, arrays will need to be of the same length for this function to work.

=ROUND(SUMPRODUCT(A2:A6,B2:B6),-1)

In this example, SUMPROD­UCT is nestled inside the ROUND function and serves as the first parameter.

Summary

In Excel, SUMPROD­UCT can be used in numerous ways to simplify complex cal­cu­la­tions. You can either use the function on its own or combine it with other functions.

Go to Main Menu