Multiply All Numbers in Column by Each Other

texasfan1012

New Member
Joined
Sep 11, 2013
Messages
5
I have a column of numbers and need to multiply every number by all the other numbers in the column and then take the sum. Is there a way to do this using a formula and not a VBA/Paste Special Multiply?

For example, if the data set were the numbers below I would need:

5*7 + 5*8 + 5*4 + 5*9 + 7*8 + 7*4 + 7*9 + 8*4 + 8*9 + 4*9

[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[/TR]
</tbody>[/TABLE]

How can this be done using a formula so that I don't have to manually calculate this for a larger data set?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
With my data in A2:A6 here is an array formula to give your result
To enter the formula with CTRL+SHIFT + ENTER, not just ENTER.
Excel will enclose the formula in {}. Do not type these yourself

=(SUMPRODUCT(--(A2:A6)*(TRANSPOSE(A2:A6)))-SUMPRODUCT(A2:A6*A2:A6))/2
 
Upvote 0
Upvote 0
Every number in the sequence needs to be multiplied by all of the numbers below it. The final solution I am looking for is the sum of all the pairs multiplied


Excel 2010
BCDEFGHIJKLM
2Cum:255
3Cnt:5555
4Header:125735
5Inputs:555840
6774520
7885945
84477
9997856
104728
117963
1288
134832
14#8972
151555544
16257574936
173585899
1845445427
1955959
2067557
2177777
2287878
2397447
24107979
25118558
26128778
27138888
28148448
29158989
30164545
31174747
32184848
33194444
34204949
35219559
36229779
37239889
38249449
39259999
using Formulas
Cell Formulas
RangeFormula
C2=PRODUCT(relS:$D$3)
C3=COUNTA(Symbols)
C15=INDEX(Symbols, MOD(INT((Line - 1) * Cnt / Cum), Cnt) + 1)
D2=PRODUCT(relS:$D$3)
D3=COUNTA(Symbols)
D15=INDEX(Symbols, MOD(INT((Line - 1) * Cnt / Cum), Cnt) + 1)
M4=K4*L4
M18=SUM(M3:M17)
B15=ROW()-ROW(B$14)
F15=MIN(C15:D15)
G15=MAX(C15:D15)
Named Ranges
NameRefers ToCells
'using Formulas'!Cnt='using Formulas'!B$3
'using Formulas'!Cum='using Formulas'!B$2
'using Formulas'!Line='using Formulas'!$B2
'using Formulas'!relS='using Formulas'!B3
'using Formulas'!Symbols=INDEX('using Formulas'!B$4:B$14, 2):INDEX('using Formulas'!B$4:B$14, ROWS('using Formulas'!B$4:B$14) - 1)


which matches konew1's formula
 
Last edited:
Upvote 0

Forum statistics

Threads
1,222,108
Messages
6,163,972
Members
451,867
Latest member
csktwyr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top