S
somethinglikeant
Hi all,
I am wondering if anyone knows of a neat way to do this:-
Say I have 3 data sets
Data set 1 is {Red,Blue,Green}
Data set 2 is {Car, Lorry}
Data set 3 is {Small,Large}
Is there a way of programmatically creating a list of combinations of
selections from these groups.
I know there are 3*2*2 = 12 combinations
I would like to create a list such as
Red Car Small
Red Car Large
Red Lorry Small
Red Lorry Large
Blue Car Small
Blue Car Large
Blue Lorry Small
Blue Lorry Large
Green Car Small
Green Car Large
Green Lorry Small
Green Lorry Large
I would like this list to always total the number of combinations
dependant on the number of data sets and elements in this set. I want a
pure procedure to handle x data sets each with however many elements.
I have each data set under headings in a spreadsheet.
I have got so far with the code and become unstuck.
Any help appreciated,
somethinglikeant
I am wondering if anyone knows of a neat way to do this:-
Say I have 3 data sets
Data set 1 is {Red,Blue,Green}
Data set 2 is {Car, Lorry}
Data set 3 is {Small,Large}
Is there a way of programmatically creating a list of combinations of
selections from these groups.
I know there are 3*2*2 = 12 combinations
I would like to create a list such as
Red Car Small
Red Car Large
Red Lorry Small
Red Lorry Large
Blue Car Small
Blue Car Large
Blue Lorry Small
Blue Lorry Large
Green Car Small
Green Car Large
Green Lorry Small
Green Lorry Large
I would like this list to always total the number of combinations
dependant on the number of data sets and elements in this set. I want a
pure procedure to handle x data sets each with however many elements.
I have each data set under headings in a spreadsheet.
I have got so far with the code and become unstuck.
Any help appreciated,
somethinglikeant