translate column vba excel code example
Example 1: excel vba function to convert column number to letter
Function ColName(n)
ColName = Split(Cells(, n).Address, "$")(1)
End Function
Example 2: excel vba column letter
Function ColumnLetter(pColIndex As Long) As String
ColumnLetter = Replace(Cells(1, pColIndex).Address(True, False), "$1", "")
End Function