# multiplication of 3 sets

#### new exceler

##### New Member
hello every body
i want to calculate all possible results of multiplication of 3 sets: a,b,c with the same members :{1,2,3,4,5,6,7,8,9,10}
in excel ? that is how can i caculate all members of the set m ={a*b*c} in excel?
thanks

### Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi.

This will produce a list of distinct products beginning in A1:

Code:
``````Sub Products()

Dim i As Integer, j As Integer, k As Integer

For i = 1 To 10
For j = 1 To 10
For k = 1 To 10
Cells(100 * (i - 1) + 10 * (j - 1) + k, 1).Value = i * j * k
Next k
Next j
Next i

End Sub``````

Regards

thank you .it's good
but can i do it without programming? i mean just by excel functions and menus? how?
thanks

It's possible, yes, though not straightforward.

Can I ask why VBA is not an option for you?

Also, is this a one-off exercise? I can simply give you the values if you want (there're only 120).

Regards

i'm a begginer in excel,and i don't know vba;
could you please do a two-off exercise?

What do you need?

Regards

Restricted to native Excel, I would put the formula =MOD(ROW(A10),10)+1 in A2 and =INT(ROW(A10)/10) in B2.
Dragged down 100 rows, that would give pairs of numbers 1,1 2,1 3,1 ... 1,2 2,2 .... 10,10

Then in C1, put the formula =COLUMN(A1) and drag right to L1, which gives 1 2 3 ... 10

Then in C2, put the formula =\$A2*\$B2*C\$1 and drag it down and right to L1001.

The results of that last formula are the products that you seek.

Hi

Another option.

In A1:

=PRODUCT(1+MOD(INT((ROW(A1)-ROW(\$A\$1))/10^{0,1,2}),10))

Copy down till A1000

@PGC

Nice. This alternative will also produce the same results as yours, I believe:

=PRODUCT(1+MID(TEXT(ROWS(\$1:1)-1,"000"),{1,2,3},1))

Regards

@PGC

Nice. This alternative will also produce the same results as yours, I believe:

=PRODUCT(1+MID(TEXT(ROWS(\$1:1)-1,"000"),{1,2,3},1))

Regards

Hi

Yes, I believe it will. For the set 1-10 your formula is preferable, much simpler.

For another set instead of 1-10, for ex. if the elements are 1-5 or 1-8, in my formula one just replaces the 10 with the upper bound of the interval.

Replies
2
Views
107
Replies
1
Views
134
Replies
8
Views
296
Replies
5
Views
175
Replies
5
Views
246

1,221,063
Messages
6,157,699
Members
451,434
Latest member
VanDookie

### 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.

### Which adblocker are you using?

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

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