Produce Combinations

Cobber2008

New Member
Joined
Nov 29, 2020
Messages
28
Office Version
  1. 365
I have a table with 4 columns with number in them. i want to be able to produce all the various combinations as per what i started in the combination column. Any idea how to do this thank you.

ABCDCombinations
15151-5-1-5
23931-3-1-5
1213361-13-1-5
421191-2-1-5
157121.
6152.
.
6-1-5-2
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Sunny thanks for the reply - that gives the first combinations but not what i am after but i think i solved it.
 
Upvote 0
i think i solved it.
Good to hear you solved it.
If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0
oK this is what i have used - INDEX(A:A, INT((ROW()-1)/(COUNTA(B:B)*COUNTA(C:C)*COUNTA(D:D)))+1) & INDEX(B:B, MOD(INT((ROW()-1)/(COUNTA(C:C)*COUNTA(D:D))), COUNTA(B:B))+1) & INDEX(C:C, MOD(INT((ROW()-1)/COUNTA(D:D)), COUNTA(C:C))+1) & INDEX(D:D, MOD(ROW()-1, COUNTA(D:D))+1)
 
Upvote 0
As you have 365 another option is
Fluff.xlsm
ABCDEF
1ABCD
215151-5-1-5
323931-5-1-3
41213361-5-1-6
5421191-5-1-9
61571211-5-1-1
761521-5-1-2
81-5-9-5
91-5-9-3
101-5-9-6
111-5-9-9
121-5-9-1
131-5-9-2
141-5-3-5
151-5-3-3
161-5-3-6
171-5-3-9
181-5-3-1
191-5-3-2
201-5-11-5
211-5-11-3
221-5-11-6
231-5-11-9
241-5-11-1
251-5-11-2
261-5-12-5
271-5-12-3
281-5-12-6
291-5-12-9
301-5-12-1
311-5-12-2
321-5-5-5
Sheet6
Cell Formulas
RangeFormula
F2:F1297F2=LET(d,A2:D7,r,ROWS(d),c,COLUMNS(d),s,SEQUENCE(,c),b,MID(BASE(SEQUENCE(r^c,,0),r,c),s,1)+1,BYROW(INDEX(d,b,s),LAMBDA(br,TEXTJOIN("-",,br))))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,281
Messages
6,124,045
Members
449,139
Latest member
sramesh1024

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