LetterFromColumn

Returns the letter from a column in Excel for a given column number.

Function LetterFromColumn(Nummer As Integer) As String
    If Nummer <= 26 Then
        LetterFromColumn= Chr(64 + Nummer)
    Else
        If Nummer Mod 26 = 0 Then
           LetterFromColumn= Chr(Int(Nummer / 26) + 64 - 1) & "Z"
        Else
           LetterFromColumn= Chr(Int(Nummer / 26) + 64) & Chr((Nummer Mod 26) + 64)
        End If
    End If
End Function