View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Permutation result

.. how many combinations of 4 letters can be generated & what are they

One easy play to generate the combinations
is to use Myrna Larson's power subroutine ..

Take away this implemented sample from my archives:
http://www.savefile.com/files/518493
MyrnaLarson_Combination_Permutation.xls
(full details inside, ready to run)

In the sample file,

In Sheet1,
1. Enter the letter C or P in A1
(C = combinations, P = permutations),
eg enter: C (in your example, it's combinations)

2. Enter the number of items involved in A2,
eg enter: 4 (in your case, it's 4 items)

3. Enter/List the N items in A3 down
eg in A3:A6, enter the 4 items: 1,1,1,2

4. Select A1 (this cell selection is required),
then click the button "ListPermutations"
to run the sub ListPermutations

5. The results will be written to a new sheet (just to the left),and wrap*
in a zig-zag manner until all combinations are exhausted
*if it exceeds the rows limit of 65536 in xl97 to xl2003

--------
Go easy when you "ramp up" the generation
(increasing picks on increasing N values)

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,600 Files:362 Subscribers:60
xdemechanik
---