Combinations/Permutations

Greetings Everyone.  I have attached a workbook that I created to breakout unique Part Numbers Based on Size Options and Color Codes.  It seems pretty clunky so I know there has to be a better way to code this than what I have done.  Can someone provide some feedback for learning here?  Thanks!
Permutations1.7.3.xls
Christopher WrightDirector, Service DeliveryAsked:
Who is Participating?
 
d-glitchCommented:
How many base part numbers are there?

Do you want the part number to make sense:   SHRT-10-RED  vs  314-10-02
0
 
d-glitchCommented:
You need all the data (and so do we).

What are the possible colors and sizes?
Do you need a serial number as well?  Or do all the red, size 10 shirts have the same Part No.
0
 
Martin LissOlder than dirtCommented:
The recursive function shown in post #9 here looks interesting.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Christopher WrightDirector, Service DeliveryAuthor Commented:
Hi d-glitch.  The base part numbers are dynamic.  They vary depending on the manufacturer we are dealing with.  The same applies to the Size Options and Color Codes.  Maybe I should have went with a free text for all columns.  Would that have been a better approach?

Also, I should not have placed the word permutation in the title since I am really going after combinations.  None of the values change, I am simply looking for a concatenated list that has all three columns combined in every possible combination.
0
 
Martin LissOlder than dirtCommented:
Did you try to adapt that recursive function to your code?
0
 
Christopher WrightDirector, Service DeliveryAuthor Commented:
I am still tinkering with it a bit.
0
 
RobOwner (Aidellio)Commented:
The easiest way to achieve this would to use a database.  Have tables for each of the elements eg product code, colour, size etc

Then by doing a simple SELECT query would bring in all combinations

SELECT PartNo, Size, Color FROM tblParts, tblSizes, tblColors
0
 
Christopher WrightDirector, Service DeliveryAuthor Commented:
Great help from everyone.  I took a little from each and ultimately finished with a database.  Thanks for all of your help Gents!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.