user3860954
user3860954

Reputation: 97

Excel Formula SUMPRODUCT

Can anyone explain the meaning of the following formula?

Summary is an Excel tab name, and forecast Submit is also an excel tab name.

=SUMPRODUCT(--(A85=Summary!$A$2:$A$144),'forecast Submit'!$C$2:$C$144)

Upvotes: 0

Views: 148

Answers (2)

Ben I.
Ben I.

Reputation: 1082

Let's see if we can break this down for you:

Summary!$A$2:$A$144

This notation means column A, rows 2-144, within the sheet Summary. You can ignore the dollar signs ($) for now, because they're not actually changing your output. At this point, you have a series of values, all in column A.

A85=Summary!$A$2:$A$144

This compares each item in Summary!A2:A144 to the item in A85, and reports true if they are equal. At this point, you have a series of TRUE and FALSE values, and you can imagine that they are sitting in some invisible new (temporary) column, somewhere off to the side.

--()

This converts boolean (true/false) values to 1s and 0s. A value of TRUE becomes 1 and a value of FALSE becomes 0.

So now, our invisible column is filled with 1s and 0s.

(sumproduct...) multiplies numbers in corresponding rows, and then sums the results. In practice, you are now multiplying values by 1 or 0, and summing the result. Of course, anything multiplied by 0 is 0, and anything multiplied by 1 is itself. So, in effect, the 0s you generated earlier are being used to ignore certain rows, and the 1s are being used to include the other rows.

Overall, it will add all of the numbers in forecast Submit for which the corresponding row in Summary is equal to A85.

Upvotes: 3

woollen19
woollen19

Reputation: 49

https://exceljet.net/excel-functions/excel-sumproduct-function

This should give you all the answers that you seek.

Upvotes: 0

Related Questions