Ripo
Ripo

Reputation: 47

Excel: Sum of sumproducts

In a math context I have the sum over two indices of the product of a one-index variable with a two-indices variable.

In the Excel context, suppose I have the range A1:C1 and a matrix A2:C6 and all I want to do is:

sumproduct(A1:C1;A2:C2)+sumproduct(A1:C1;A3:C3)+sumproduct(A1:C1;A4:C4)+sumproduct(A1:C1;A5:C5)+sumproduct(A1:C1;A6:C6).

Is there any automated way to do it using formulas?

Upvotes: 1

Views: 152

Answers (2)

Rick
Rick

Reputation: 45271

Just use SUMPRODUCT:

=SUMPRODUCT(A1:C1*A2:C6)

Upvotes: 4

Daniel
Daniel

Reputation: 434

I'm not sure if I understand you correctly but can't you just write

=SUMPRODUCT($A$1:$C$1;A2:C2)

then copy it down and sum up the results?

Upvotes: 2

Related Questions