Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Permutation result

Hi,

I was tryinig to work on Permutation Combination keys in excel.
I wanted to know how many combinations of 4 letters can be generated and
what are they.

Problem Example:
1112

result (in different cells):
1112
1121
1211
2111

any help?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Permutation result

Do you mean any 4 letters (from A to Z) or four known letters like A,B,C,D?
If the first, then the answers is 26*25*24*23 if they are all different;
that is 358800
and would take up a lot of space

If the second, then the answer, without duplicates, is 24

This question is asked a lot: search Google Groups with "Excel Permutations"
and you will get about 3K of hits. Be prepared for VBA code.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"mimi" wrote in message
...
Hi,

I was tryinig to work on Permutation Combination keys in excel.
I wanted to know how many combinations of 4 letters can be generated and
what are they.

Problem Example:
1112

result (in different cells):
1112
1121
1211
2111

any help?



  #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
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Permutation result

Hi Bernard,
thanks for the post.

your second solution is what i'm looking for.
i've been googling it all day..all comes with the programming language which
i dun understand at all :D
haha
it's ok though..thanks a lot.

I'll dig further into it..

c ya ;)

"Bernard Liengme" wrote:

Do you mean any 4 letters (from A to Z) or four known letters like A,B,C,D?
If the first, then the answers is 26*25*24*23 if they are all different;
that is 358800
and would take up a lot of space

If the second, then the answer, without duplicates, is 24

This question is asked a lot: search Google Groups with "Excel Permutations"
and you will get about 3K of hits. Be prepared for VBA code.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"mimi" wrote in message
...
Hi,

I was tryinig to work on Permutation Combination keys in excel.
I wanted to know how many combinations of 4 letters can be generated and
what are they.

Problem Example:
1112

result (in different cells):
1112
1121
1211
2111

any help?




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

See my response, take away the sample from the link given
It's been made v.easy for you to run straight-off
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,600 Files:362 Subscribers:60
xdemechanik
---
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
permutation Margie Excel Worksheet Functions 3 April 11th 08 12:03 AM
Permutation Builder Stephen Excel Discussion (Misc queries) 3 February 6th 08 07:38 PM
Permutation in excel Sweden Excel Worksheet Functions 2 September 25th 05 05:05 PM
Permutation in excel Sweden Excel Worksheet Functions 1 September 17th 05 02:16 AM
Permutation Output Tuna Witch Excel Worksheet Functions 2 December 21st 04 09:09 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"