Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Consecutive 3-Character code (Excel 2000 >)

    I need help with setting up a list in the A column that will label each row with a consecutive 3-Character code starting with AAA, AAB, AAC,
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Consecutive 3-Character code (Excel 2000 >)

    You could write a triple loop:

    Dim i As Integer
    Dim j As Integer
    Dim k As Integer
    Dim n As Long

    For i = 1 To 26
    For j = 1 To 26
    For k = 1 To 26
    n = n + 1
    Range("A" & n) = Chr(64 + i) & Chr(64 + j) & Chr(64 + k)
    Next k
    Next j
    Next i

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Consecutive 3-Character code (Excel 2000 >)

    Heck...that ran fast.
    Thx a stack!!!!
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •