The SUMPRODUCT function is used to multiply the values of multiple arrays and then sum the totals. However it is capable of so much more amazing feats. It truly is one of those hidden gems waiting to be discovered.

In this example the SUMPRODUCT function is being used to count the number of orders in the list shown below.

This list has been formatted as a table providing many benefits. One of the benefits is the ease of referencing the necessary columns within a formula (Find out more about tables in Excel).

To use the SUMPRODUCT function to count records we will enter it as below.

=SUMPRODUCT((condition 1)*(condition 2)*(condition 3))

Each condition, or array, is enclosed within its own set of brackets. The multiplication operator (*) is used to apply the AND logic between each condition.

For example, the formula below will count all the orders by the salesperson Peacock (J9), and for the product Tofu (K9).

An area where SUMPRODUCT demonstrates its flexibility over alternatives such as COUNTIFS, is its ability to handle OR logic between conditions.

If we want to count all the orders by the salesperson Peacock (J9), and also the Salesperson Taylor (J10) we could enter the formula below. The Plus operator (+) has been used to create the OR logic between conditions.

The SUMPRODUCT function can handle many more conditions if necessary. When you get to grips with it you will feel like no data analysis is out of your reach.

You may already be aware of the Large function. This function is used to return the nth largest value from a list.

To find the 1st and then 2nd, 3rd, 4th and 5th largest values in a list based on multiple criteria, we will need to use the Large function with the Sumproduct function.

The Sumproduct function is a brilliant and incredibly useful function for many situations. It is commonly used to test multiple criteria such as in this example.

The formula below demonstrates finding the 2nd largest value from a list where UK is in column B and London is in column C.

=SUMPRODUCT(LARGE((Data!$B$2:$B$6=”UK”)*(Data!$C$2:$C$6=”London”)*(Data!$E$2:$E$6),2))

Each criteria is placed in parenthesis and the multiply sign is used to ensure each criteria must be met. The plus sign could be used instead to apply OR logic between tests.

Being able to use formulas such as this to analyse data is extremely beneficial. Before we implemented this, they were using 3 PivotTables to drill down the information in sections.

]]>