As the formula is copied across and down, it returns a sum of values associated with “A” and “B” in the table to the left. Working from the inside out, SUMPRODUCT is configured with two arguments, array1 and array2. The first array, array1, is set up to act as a “filter” to allow only values that meet criteria: Note: both references above are mixed references. $B5:$H5 has the columns locked, so that the formula can be copied across. K$4 has the row locked so that the formula can be copied down. All values in the range B5:H5 are compared to the value in K4. The result is an array of TRUE and FALSE values like this: In this array, each TRUE value corresponds to the value “A” in B5:H5, and FALSE values correspond to other values. The double negative (–) is used to convert the TRUE and FALSE values to 1s and 0s and the result looks like this: We can now simplify the formula like this: The second array, input as $C5:$I5, evaluates to: We can now simplify the formula to: Next, SUMPRODUCT multiplies the two arrays together. Only the values in the second array that correspond to 1s in the first array survive this operation. Since SUMPRODUCT is programmed to ignore the errors that result from multiplying text values, the final array looks like this: SUMPRODUCT then sums the array and returns a final result of 4. This represents the numbers that correspond to “A’” in row 5. As the formula is copied down and across, we get a sum for “A” and “B” in each row.

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.