PC Review


Reply
Thread Tools Rate Thread

3-character combinations?

 
 
Allison
Guest
Posts: n/a
 
      20th Oct 2008
Excel 2003 SP3
Win XP SP2

Is there a quick way to generate a list of all possible 3-character
combinations using the alpha characters A-Z and the numbers 0-9?


 
Reply With Quote
 
 
 
 
PCLIVE
Guest
Posts: n/a
 
      20th Oct 2008
Probably other ways, but here's one:

- Place A-Z in A1 to A26
- Place 0-9 in A27 to A36

Then you can use this code.

Sub test()

For cOne = 1 To 36
myCell1 = Range("A" & cOne).Value
For cTwo = 1 To 36
myCell2 = myCell1 & Range("A" & cTwo).Value
For cThree = 1 To 36
myCell3 = myCell2 & Range("A" & cThree).Value
Range("B" & Range("B65536").End(xlUp).Row + 1).Value = myCell3
Next cThree
Next cTwo
Next cOne

End Sub


HTH,
Paul

--

"Allison" <(E-Mail Removed)> wrote in message
news:86B2A5E5-70F5-440A-9B5E-(E-Mail Removed)...
> Excel 2003 SP3
> Win XP SP2
>
> Is there a quick way to generate a list of all possible 3-character
> combinations using the alpha characters A-Z and the numbers 0-9?
>
>



 
Reply With Quote
 
Allison
Guest
Posts: n/a
 
      20th Oct 2008
This worked great. Thank you very much.

Allison

"PCLIVE" wrote:

> Probably other ways, but here's one:
>
> - Place A-Z in A1 to A26
> - Place 0-9 in A27 to A36
>
> Then you can use this code.
>
> Sub test()
>
> For cOne = 1 To 36
> myCell1 = Range("A" & cOne).Value
> For cTwo = 1 To 36
> myCell2 = myCell1 & Range("A" & cTwo).Value
> For cThree = 1 To 36
> myCell3 = myCell2 & Range("A" & cThree).Value
> Range("B" & Range("B65536").End(xlUp).Row + 1).Value = myCell3
> Next cThree
> Next cTwo
> Next cOne
>
> End Sub
>
>
> HTH,
> Paul
>
> --
>
> "Allison" <(E-Mail Removed)> wrote in message
> news:86B2A5E5-70F5-440A-9B5E-(E-Mail Removed)...
> > Excel 2003 SP3
> > Win XP SP2
> >
> > Is there a quick way to generate a list of all possible 3-character
> > combinations using the alpha characters A-Z and the numbers 0-9?
> >
> >

>
>
>

 
Reply With Quote
 
PCLIVE
Guest
Posts: n/a
 
      20th Oct 2008
Please not that when it gets to the numbers that begin with zero, excel will
treat it as a number and automatically drop the zero.
So "012" would end up being "12". One way that could fix this is to format
column B as text before you run this code.

Glad I could help.
Paul

--

"Allison" <(E-Mail Removed)> wrote in message
news:76CB2E0B-1D52-4E33-911C-(E-Mail Removed)...
> This worked great. Thank you very much.
>
> Allison
>
> "PCLIVE" wrote:
>
>> Probably other ways, but here's one:
>>
>> - Place A-Z in A1 to A26
>> - Place 0-9 in A27 to A36
>>
>> Then you can use this code.
>>
>> Sub test()
>>
>> For cOne = 1 To 36
>> myCell1 = Range("A" & cOne).Value
>> For cTwo = 1 To 36
>> myCell2 = myCell1 & Range("A" & cTwo).Value
>> For cThree = 1 To 36
>> myCell3 = myCell2 & Range("A" & cThree).Value
>> Range("B" & Range("B65536").End(xlUp).Row + 1).Value =
>> myCell3
>> Next cThree
>> Next cTwo
>> Next cOne
>>
>> End Sub
>>
>>
>> HTH,
>> Paul
>>
>> --
>>
>> "Allison" <(E-Mail Removed)> wrote in message
>> news:86B2A5E5-70F5-440A-9B5E-(E-Mail Removed)...
>> > Excel 2003 SP3
>> > Win XP SP2
>> >
>> > Is there a quick way to generate a list of all possible 3-character
>> > combinations using the alpha characters A-Z and the numbers 0-9?
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Formatting text in cell (character by character) TomC Microsoft Excel Misc 0 29th Jan 2010 07:25 PM
Creating character combinations out of a possible set... Shaka215@gmail.com Microsoft Excel Programming 3 5th Jan 2007 12:29 PM
importing undelimited text file data, character-by-character =?Utf-8?B?VGhlIE1vcyQ=?= Microsoft Excel Programming 4 26th Dec 2005 11:01 AM
Breaking URL character combinations GrantMagic Microsoft ASP .NET 2 22nd Oct 2004 05:14 PM
Re: List of Character Codes (ALT + numeric keypad = character) Rob Schneider Microsoft Word Document Management 0 10th Sep 2003 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 PM.