I've looked everywhere, but can't find a workable solution to this question that would suit my purposes.
Quite simply, I'm looking to generate all the permutations of n - the number of items in a pool, selecting k - the number of objects to choose each time.
With no repetitions.
For example, I have a basket of 8 billiard balls numbered 1 to 8, and I choose 3, put them back and choose 3 more and continue until all possible permutations have been selected.
The sheet function =permut(8, 3) = 336.
But what are the permutations that can be produced?
I'm looking for a list.
I've come across various suggestions, but nothing like what this website does:
Permutation generator of N items from a pool of K to without repetitions.
A sample of the result is:
The website is fine, but you have to download the results and import them into a spreadsheet, which gets pretty onerous after a pool of 10 or 11 items, and even worse when having to work with such large outputs. Better to have a script run through the list and analyze each selection as it's generated and output only the hits. Not to mention that N and K can change depending on the user's needs.
I'm moderately proficient in Google script, so if something already exists out there, I could probably modify it to make work.
I thank you for your time.