In Access I write data into an Excel file and need to address cells. For example I want to address the 50 th column and need to get the column address (in this example AX).
I found a solution which not proper work: https://support.microsoft.com/de-de/kb/833402/en-us
Function ConvertToLetter(iCol As Integer) As String
Dim iAlpha As Integer
Dim iRemainder As Integer
iAlpha = Int(iCol / 27)
iRemainder = iCol - (iAlpha * 26)
If iAlpha > 0 Then
ConvertToLetter = Chr(iAlpha + 64)
If iRemainder > 0 Then
ConvertToLetter = ConvertToLetter & Chr(iRemainder + 64)
53 results in A[ instead of BA .
Is there any proper solution?