View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Whelan Whelan is offline
external usenet poster
 
Posts: 2
Default Three Letter List

Yes!

In fact they all work. Thank you so much for you help on this, guys.

Whelan

"Ron Coderre" wrote:

Perhaps this:

Sub Build3AlphaSeq()
Dim iChar_1 As Integer
Dim iChar_2 As Integer
Dim iChar_3 As Integer
Dim cStartCell As Range
Dim iCtr As Integer

On Error GoTo errTrap
Set cStartCell = Selection.Cells(1, 1)
iCtr = 0
For iChar_1 = 65 To 90
For iChar_2 = 65 To 90
For iChar_3 = 65 To 90
cStartCell.Offset(RowOffset:=iCtr).Value = _
Chr(iChar_1) & Chr(iChar_2) & Chr(iChar_3)
iCtr = iCtr + 1
Next iChar_3
Next iChar_2
Next iChar_1
Exit Sub
errTrap:
MsgBox "Problem encountered completing list"
End Sub

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Whelan" wrote in message
...
Hello, I hope you can help me with this.

I want to create in Excel a three letter list Starting in field cell A1
with
AAA, cell A2 being AAB, Cell A3 being AAC, and ending up with ZZZ. Rather
than typing each out I was just going to code it in VB. However I've come
up
short. Way short. I'm thinking a loop is required or a Do Until command,
but
can't seem to get the exact process right.

Any advice would be welcome!

Thanks,

Whelan