using sumproduct
I am trying to multiply elements of two arrays of length 10 and sum the 10
products. The first array is A1 - A10 (vertical). The second array is C1 - L1 (horizontal). This formula works: =A1*C1+A2*D1+A3*E1+A4*F1+A5*G1+A6*H1+A7*I1+A8*J1+A 9*K1+A10*L1 I was told that this is dumb and to use sumproduct. So I try: =SUMPRODUCT(A1:A10,C1:L1) and all it tells me is #VALUE! Now I am sure that this is really simple, but I am stumped and will appreciate and help anyone can give me. -- jake |
using sumproduct
The formula SUMPRODUCT needs the two arrays to be the same size, and in this
case they are not, even if they have the same number of elements (one is 10x1, other is 1x10). You can use the following array formula instead: =SUM(A1:A10*TRANSPOSE(C1:L1)) Enter it with CTRL+SHIFT+ENTER Hope this helps, Miguel "Jakobshavn Isbrae" wrote: I am trying to multiply elements of two arrays of length 10 and sum the 10 products. The first array is A1 - A10 (vertical). The second array is C1 - L1 (horizontal). This formula works: =A1*C1+A2*D1+A3*E1+A4*F1+A5*G1+A6*H1+A7*I1+A8*J1+A 9*K1+A10*L1 I was told that this is dumb and to use sumproduct. So I try: =SUMPRODUCT(A1:A10,C1:L1) and all it tells me is #VALUE! Now I am sure that this is really simple, but I am stumped and will appreciate and help anyone can give me. -- jake |
using sumproduct
It does help.
Thank you for your time & willingness to share it. -- jake "Miguel Zapico" wrote: The formula SUMPRODUCT needs the two arrays to be the same size, and in this case they are not, even if they have the same number of elements (one is 10x1, other is 1x10). You can use the following array formula instead: =SUM(A1:A10*TRANSPOSE(C1:L1)) Enter it with CTRL+SHIFT+ENTER Hope this helps, Miguel "Jakobshavn Isbrae" wrote: I am trying to multiply elements of two arrays of length 10 and sum the 10 products. The first array is A1 - A10 (vertical). The second array is C1 - L1 (horizontal). This formula works: =A1*C1+A2*D1+A3*E1+A4*F1+A5*G1+A6*H1+A7*I1+A8*J1+A 9*K1+A10*L1 I was told that this is dumb and to use sumproduct. So I try: =SUMPRODUCT(A1:A10,C1:L1) and all it tells me is #VALUE! Now I am sure that this is really simple, but I am stumped and will appreciate and help anyone can give me. -- jake |
All times are GMT +1. The time now is 03:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com