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!!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
What's the expected result in column C?
 
Upvote 0
OK. Why is that the answer?
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

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