Generating all possible combinations for multiple lists

irishj

New Member
Joined
Sep 14, 2013
Messages
2
I have seen many posts that contain VBA code to generate all possible combinations for two lists of data, I haven't been able to find a post for multiple lists of possible combinations(I am working with 10-14 lists).

Below is an example. I can adjust the code based on how many lists, so the code doen't need to be dynamic for # of columns. Example of a few possible combinations from the data below would be:
ONE0AT470A
ONE3DV223D
THREE0AT551B
etc......

Info in column A will always be first in the combinations,column B will be next, and so on.....An example of a combination I DO NOT want generated would be:
A047TA0ONE
1TWOBG551B

I would like the possible combinations to be listed on a new sheet(same workbook). Thanks in advance for any help!!

A:A</SPAN>
B:B</SPAN>
C:C</SPAN>
D:D</SPAN>
E:E</SPAN>
F:F</SPAN>
G:G</SPAN>
ONE</SPAN>
0</SPAN>
A</SPAN>
T</SPAN>
47</SPAN>
0</SPAN>
A</SPAN>
TWO</SPAN>
1</SPAN>
B</SPAN>
G</SPAN>
55</SPAN>
1</SPAN>
B</SPAN>
THREE</SPAN>
2</SPAN>
C</SPAN>
V</SPAN>
22</SPAN>
2</SPAN>
C</SPAN>
FOUR</SPAN>
3</SPAN>
D</SPAN>
3</SPAN>
D</SPAN>
FIVE</SPAN>
4</SPAN>
E</SPAN>
4</SPAN>
E</SPAN>
5</SPAN>
F</SPAN>
5</SPAN>
F</SPAN>
6</SPAN>
G</SPAN>
7</SPAN>
H</SPAN>
8</SPAN>
I</SPAN>
9</SPAN>
J</SPAN>
10</SPAN>

<TBODY>
</TBODY>
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Thank you for your quick response. That one works fairly well, however it calculates the 'blank' cells as a possible combination.
 
Upvote 0
Not if they are blanks. Make sure the cells are actually empty, and don't contain a space or null string.
 
Upvote 0

Forum statistics

Threads
1,215,149
Messages
6,123,311
Members
449,095
Latest member
Chestertim

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