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

shg

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

shg

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

chelseajonesy

New Member
Joined
Mar 13, 2014
Messages
4
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,718
Office Version
2010
Platform
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.
 

Forum statistics

Threads
1,082,308
Messages
5,364,418
Members
400,801
Latest member
julievandermeulen

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top