Explanation
TheSUMPRODUCT functionmultiplies ranges or arrays together and returns the sum of products.
This sounds boring, but SUMPRODUCT is an elegant and versatile function, which this example illustrates nicely.
In this example, SUMPRODUCT is configured with twoarrays.
Effectively, the second array acts as a filter for the values in the first array.