Hi I'm hoping someone can help with my query although I know it is a tricky one.

I have a spreadsheet with 2 columns containing the following

ID1 WordA WordB WordC WordD

ID2 WordE WordF WordG

ID3 WordH WordI WordJ WordK WordL WordM

etc

What I require is all the permuations for each ID (I have 16000+) so I think it would have to get put into a text file and I'll probably split the spreadsheet into more manageable groups. The order is important, but I wouldn't want any permutations containing less than 3 words. The total number of words for each ID changes ranging from 3 to some with possibly 20 - which I know will create a lot of results.

The result I'm looking for would be something like this:

ID1 WordA WordB WordC

ID1 WordB WordA WordC

ID1 etc

ID1 WordA WordB WordC WordD

ID1 WordA WordB WordD WordC

ID1 etc

ID2 WordE WordG WordF

ID2 WordG WordF WordE

ID2 etc

Hopefully someone has done something similar before.

Many thanks

We now have the capability to generate:

1 - Permutations of sets of words,

2 - Permutations, followed by Combinations (on each permutated output) on sets of words,

3 - Combinations of sets of words, and

4 - Combinations, followed by Permutations (on each combinated output) on sets of words.

Dave

WordPermutatorNCombinator-r2.xlsm