I need to come up with all the combinations for the below data. I have numbers, colors and names. I need to put one number, two colors and three names in a row without repeating a name or color in each row. I would also like to not replicate the rows with the colors or names in a different order. The top row on my output sheet would have the headers as seen below and then I have a data tab which lists the possible inputs. It would be great to also know how to limit the value of the entire row to say 10 if each input had a value of 1-5. If that is not possible, I can delete the rows with values greater than 10. I would like to do all this within VBA code.
[TABLE="width: 384"]
<tbody>[TR]
[TD="width: 64"]Number[/TD]
[TD="width: 64"]Color[/TD]
[TD="width: 64"]Color[/TD]
[TD="width: 64"]Name[/TD]
[TD="width: 64"]Name[/TD]
[TD="width: 64"]Name[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]Number[/TD]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Black[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Blue[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Yellow[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Orange[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Red[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Green[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Plum[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Purple[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Pink[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Gray[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]White[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Adam[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Joe[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Brett[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Aaron[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Jerry[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Kim[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]James[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Pat[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Jeff[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Rob[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Bill[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 384"]
<tbody>[TR]
[TD="width: 64"]Number[/TD]
[TD="width: 64"]Color[/TD]
[TD="width: 64"]Color[/TD]
[TD="width: 64"]Name[/TD]
[TD="width: 64"]Name[/TD]
[TD="width: 64"]Name[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]Number[/TD]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]Number[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Black[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Blue[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Yellow[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Orange[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Red[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Green[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Plum[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Purple[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Pink[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]Gray[/TD]
[/TR]
[TR]
[TD]Color[/TD]
[TD]White[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Adam[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Joe[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Brett[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Aaron[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Jerry[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Kim[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]James[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Pat[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Jeff[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Rob[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Bill[/TD]
[/TR]
</tbody>[/TABLE]