Anybody, please help me. I am not good with VBA macros but I need to do a complete enumeration of number permutations
Here's my problem.
I have 8 objects--1, 2, 3, 4, 5, 6, 7 and 8. Each "solution" must contain all 8 objects, but the order matters. I need a macro that can generate all of these possible permutations.
Additionally, each of the objects need to be placed in a separate cell. It should look like this, where each row is a "solution:
[TABLE="width: 500"]
<tbody>[TR]
[TD]1st Object[/TD]
[TD]2nd Object[/TD]
[TD]3rd Object[/TD]
[TD]4th Object[/TD]
[TD]5th Object[/TD]
[TD]6th Object[/TD]
[TD]7th Object[/TD]
[TD]8th Object[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]8[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
And that list would continue until:
[TABLE="width: 500"]
<tbody>[TR]
[TD]8[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Please help me. I am so clueless as to what I need to do. Thank you to all the kind souls out there.)
Here's my problem.
I have 8 objects--1, 2, 3, 4, 5, 6, 7 and 8. Each "solution" must contain all 8 objects, but the order matters. I need a macro that can generate all of these possible permutations.
Additionally, each of the objects need to be placed in a separate cell. It should look like this, where each row is a "solution:
[TABLE="width: 500"]
<tbody>[TR]
[TD]1st Object[/TD]
[TD]2nd Object[/TD]
[TD]3rd Object[/TD]
[TD]4th Object[/TD]
[TD]5th Object[/TD]
[TD]6th Object[/TD]
[TD]7th Object[/TD]
[TD]8th Object[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]8[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
And that list would continue until:
[TABLE="width: 500"]
<tbody>[TR]
[TD]8[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Please help me. I am so clueless as to what I need to do. Thank you to all the kind souls out there.)