#1   Report Post  
Posted to microsoft.public.excel.misc
Jakobshavn Isbrae
 
Posts: n/a
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Jakobshavn Isbrae
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding "OR" to a Sumproduct Formula Duke Carey Excel Worksheet Functions 0 March 21st 06 06:41 PM
Need help with sumproduct & dynamic ranges bill_s1416 Excel Worksheet Functions 1 March 19th 06 03:36 AM
Can I reference =, <, or > sign in SUMPRODUCT BobT Excel Discussion (Misc queries) 7 February 16th 05 01:58 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"