Permutations of Set of Numbers in a Column

chelseajonesy

New Member
Joined
Mar 13, 2014
Messages
4
I have searched all over the internet but am having trouble finding the answer to my problem. I would like to write a macro that will list the possible permutations of a column, in the column right next to it. For instance, see columns 1 and 2:

11Permutation1
22Permutation1
33Permutation1
1Permutation2
3Permutation2
2Permutation2
2Permutation3
1Permutation3
3Permutation3
2Permutation4
3Permutation4
1Permutation4
3Permutation5
1Permutation5
2Permutation5
3Permutation6
2Permutation6
1Permutation6

<tbody>
</tbody>

Obviously column 3 is just labeling permutations, I just need a code for columns 1 and 2. Thanks in advance!!
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows
What's the expected result in column C?
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows
OK. Why is that the answer?
 

chelseajonesy

New Member
Joined
Mar 13, 2014
Messages
4

ADVERTISEMENT

I think I'm not being clear enough, my apologies. I do not expect an answer or any information in column c. I simply put in in the original post to label my permutations. Column c is useless to me in my spreadsheet, I only put it here to explain what I'm looking for.

I'm looking for a macro that will give the possible permutations from a range of values from a column (e.g "Column A"), into another column (e.g "Column B"), similar to what is listed above.
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows
There's a workbook at https://app.box.com/shared/f3puhccnqa that will do this:

B​
C​
2​
Permutations of Combinations
3​
mMin​
4​
3​
5​
mMax​
6​
3​
Space-delimited Input String​
7​
m​
1 2 3
8​
3​
3 2 1
9​
3​
3 1 2
10​
3​
2 3 1
11​
3​
2 1 3
12​
3​
1 3 2
13​
3​
1 2 3
 

chelseajonesy

New Member
Joined
Mar 13, 2014
Messages
4
There's a workbook at https://app.box.com/shared/f3puhccnqa that will do this:

B​
C​
2​
Permutations of Combinations
3​
mMin​
4​
3​
5​
mMax​
6​
3​
Space-delimited Input String​
7​
m​
1 2 3
8​
3​
3 2 1
9​
3​
3 1 2
10​
3​
2 3 1
11​
3​
2 1 3
12​
3​
1 3 2
13​
3​
1 2 3

<tbody>
</tbody>

I'm sorry this is not what i'm looking for. I would like for the numbers to appear separately listed down (in the column) rather than across (in a row). All answers I have found have been in a row. Which is why I have posted this thread.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,328
Messages
5,624,036
Members
416,007
Latest member
csf

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
Top