Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
3-character combinations?
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
3-character combinations?
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" wrote in message ... 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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
3-character combinations?
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" wrote in message ... 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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
3-character combinations?
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" wrote in message ... 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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 - Formatting text in cell (character by character) | Excel Discussion (Misc queries) | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions | |||
Creating character combinations out of a possible set... | Excel Programming | |||
importing undelimited text file data, character-by-character | Excel Programming | |||
Function to return Character Position of Xth character within a string | Excel Programming |