Hi,
I am having a problem with the following loop...
The problem is that if the spreadsheet has a column "AA" then it returns sCol as "]", when I need it to return "AA"![]()
Please Login or Register to view this content.
Thanks
Stephen
Hi,
I am having a problem with the following loop...
The problem is that if the spreadsheet has a column "AA" then it returns sCol as "]", when I need it to return "AA"![]()
Please Login or Register to view this content.
Thanks
Stephen
Hello Stephen,
The loop requires a little more math to work properly. Here is the revised version.
_________________________________________________________________
Dim I As Integer
Dim Tens As Integer
Dim Ones As Integer
Dim ColAddx As String
For I = 1 To TotalCols
Ones = I Mod 27
Tens = I \ 27
If Tens = 0 Then
ColAddx = CHR$(Ones + 64)
Else
ColAddx = Chr$(Tens + 64) & Chr$(Ones + 64)
End If
Next I
_________________________________________________________________
Hope this helps,
Leith Ross
Nice solution.
Thanks a lot!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks