Combination Sequencer Using Tables

HotNumbers

Well-known Member
Joined
Feb 14, 2005
Messages
732
Is is possible to use VB to generate all possible combinations from 3 different list . Sample of small data below:
Excel Workbook
ABCDEFG
1GeoChannelTypeSolution
2AD18AF07AD18AF07
3AE26AN62AE26AN62
4AF30AF30AF30AF30
5AG31
6AI
7AL
8AM
9AN
10AO
11AQ
12AR
13AS
14AT
15AU
16AW
17
Sheet1
Excel 2007
Cell Formulas
RangeFormula
F2=CONCATENATE(A2,B2,C2)
F3=CONCATENATE(A3,B3,C3)
F4=CONCATENATE(A4,B4,C4)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
For those who like to know... here is the solution

Sub aaa()
cntr = 1
For Each ce1 In Range("a2:a" & Cells(Rows.Count, "A").End(xlUp).Row)
For Each ce2 In Range("b2:b" & Cells(Rows.Count, "B").End(xlUp).Row)
For Each ce3 In Range("c2:c" & Cells(Rows.Count, "C").End(xlUp).Row)
For Each ce4 In Range("d2:d" & Cells(Rows.Count, "D").End(xlUp).Row)
Range("e1").Offset(cntr, 0).Value = ce1 & ce2 & ce3 & ce4
cntr = cntr + 1
Next ce4
Next ce3
Next ce2
Next ce1
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,548
Members
452,927
Latest member
rows and columns

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