ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiplying two rows together (https://www.excelbanter.com/excel-worksheet-functions/59330-multiplying-two-rows-together.html)

Lee Harris

Multiplying two rows together
 
If I have a set of coefficients in Row 1 B1:Z1 for example
and data values in Rows 2-N eg B2:Z2, B3:Z3, ...Bn:Zn

What's the proper way to have in Cell A(n) such that I sum each number in
the row by the corresponding coefficient

I mean, instead of having it like this


A2 = (B$1*B2)+(C$1*C2)+(D$1*D2)+(E$1*E2)+.....

Is this an array formula of some kind that I need?



Lee Harris

Multiplying two rows together
 

"Lee Harris" wrote in message
...
If I have a set of coefficients in Row 1 B1:Z1 for example
and data values in Rows 2-N eg B2:Z2, B3:Z3, ...Bn:Zn

What's the proper way to have in Cell A(n) such that I sum each number in
the row by the corresponding coefficient

I mean, instead of having it like this


A2 = (B$1*B2)+(C$1*C2)+(D$1*D2)+(E$1*E2)+.....

Is this an array formula of some kind that I need?


never mind, I gave SUMPRODUCT a try and this format seemed to work

=SUMPRODUCT(H38:R38,H40:R40)+SUMPRODUCT(T40:AE40,T 38:AE38)



Bob Phillips

Multiplying two rows together
 
=SUMPRODUCT(B1:M1,B2:M2)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lee Harris" wrote in message
...
If I have a set of coefficients in Row 1 B1:Z1 for example
and data values in Rows 2-N eg B2:Z2, B3:Z3, ...Bn:Zn

What's the proper way to have in Cell A(n) such that I sum each number in
the row by the corresponding coefficient

I mean, instead of having it like this


A2 = (B$1*B2)+(C$1*C2)+(D$1*D2)+(E$1*E2)+.....

Is this an array formula of some kind that I need?






All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com