Something like this would do it, just have to run it multiple times for subset size required.
Excel: number combinations, permutation and combinations, number combinations
Not sure this is in the right section but here goes. I have a list of words, and wondered how to list every possible combination of them using Excel or similar.
For example, if the list contains Dog, Cat, Mouse, I need to produce another list of:
Dog Cat Mouse
Dog Mouse Cat
Cat Mouse Dog
Cat Dog Mouse
Mouse Dog Cat
Mouse Cat Dog
.... and so on.
The trouble is, the list I have is much longer than this. Impossible task to do easily?
this would be very easy in access.
First you put a table in with all the words, including one blank field.
Then you can create a query - include the table mupltiple times with the field that has the words as an output, once for each item in the list if you want every possible combination.
run the query and you will get a table with each combination in each row.
This will include repetition so Dog, Dog, Dog would come up as well as Cat, Dog, Mouse.
If you did not want this then it would just be a question of putting in conditions in the queries to say they must not match other columns.
But this does depend on how many words you have got, too many would probably make access fall over.
If it was me then I would probably do it with vb script - but this depends on how comfortable you are with script.
I think I'm correct with this...
Factorial - Wikipedia, the free encyclopedia
If your have 5 words in your list you will get 120 combinations,
and before you know it your into some massive numbers
Actually, not quite right, since your combinations will include ones that aren't made up of the full set and no repetition, but your still talking massive numbers.
Last edited by Gerry; 18th February 2010 at 03:11 PM.
Excellent responses - thanks for all your help, I will have a look and try and work out what I'm doing (once I know exactly what's required from the list of course!).
There are currently 1 users browsing this thread. (0 members and 1 guests)