|
-
Apr 5th, 2007, 09:58 AM
#1
Thread Starter
New Member
Three Letter Combinations - how many are there?
Hello,
I'm trying to find a program or way in Excel in which I can get a full list of 3 letter combinations.
Eg:
aaa, aab, aac, aad, aae, ... etc.
It's been boggling my mind for days now. I started to enter them in Excel but thought there must be an easier way.
Does anyone know how I can create a full list of 3 letter combinations and how many would be on this list?
Thank you.
-
Apr 5th, 2007, 10:04 AM
#2
Re: Three Letter Combinations - how many are there?
If I'm not mistaken, it's 26³ = 17,576. (Then again, maths isn't my strong point. )
I guess you could write a program to generate them.
-
Apr 5th, 2007, 10:41 AM
#3
Thread Starter
New Member
Re: Three Letter Combinations - how many are there?
Yes, as you can see there are quite a lot of entries. I wouldn't know how to write such a program unfortunately...
-
Apr 5th, 2007, 11:13 AM
#4
Re: Three Letter Combinations - how many are there?
To do it in the cells, put 97 in A1,B1 and C1.
In D1 put: =CHAR(A1)&CHAR(B1)&CHAR(C1)
In A2 put =A1
In B2 put =B1
In C2 put =C1+1
In D2 put =CHAR(A2)&CHAR(B2)&CHAR(C2)
Fill down to row 26.
In A27 put =A1
In B27 put =B1+1
In C27 put =C1
Fill down to row 676
In A677 put =A1+1
In B677 put =B1
In C677 put =C1
Fill all the way down.
You can easily set up a code loop to do this - just do exactly as I have done above but put it in a module (with appropriate syntax, of course).
zaza
-
Apr 5th, 2007, 11:23 AM
#5
Thread Starter
New Member
Re: Three Letter Combinations - how many are there?
Excellent. That is really sweet. Thanks for putting your mind to this. Much appreciated.
-
Apr 5th, 2007, 01:27 PM
#6
Re: Three Letter Combinations - how many are there?
combinations?
or Permutations.
-
Apr 6th, 2007, 02:40 PM
#7
Re: Three Letter Combinations - how many are there?
Here's VB code that throws them into a listbox.
Code:
Private Sub Form_Load()
For I = 97 To 122
For J = 97 To 122
For K = 97 To 122
List1.AddItem Chr(I) & Chr(J) & Chr(K)
Next
Next
Next
MsgBox Str(List1.ListCount) & " combinations generated."
' returns 17576 combinations generated.
' aaa shows up first
' aab shows up second
' aac shows up third, etc.
End Sub
-
Apr 6th, 2007, 04:45 PM
#8
Thread Starter
New Member
Re: Three Letter Combinations - how many are there?
Thanks Code Doc! Much appreciated.
-
Apr 11th, 2007, 06:10 AM
#9
Re: Three Letter Combinations - how many are there?
Depends on the charactersset you use...
Is A the Same as a?
What about... á,ä,à,ï,1,2,3,4,5,6,7,8,9,0,!,@,#,$,%,^,&,*,(,),_,+
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
-
Apr 11th, 2007, 10:34 AM
#10
Thread Starter
New Member
Re: Three Letter Combinations - how many are there?
You have to throw a spanner into the works don't you? Well, thank goodness it doesn't matter for my purpose.
Cheers all and keep smiling. You've been a great help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|