Excel VBA Función para convertir el número de columna en letra
Function ColName(n)
ColName = Split(Cells(, n).Address, "$")(1)
End Function
Excel Hero
Function ColName(n)
ColName = Split(Cells(, n).Address, "$")(1)
End Function
Sub Letter2Number()
'PURPOSE: Convert a given letter into it's corresponding Numeric Reference
'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault
Dim ColumnNumber As Long
Dim ColumnLetter As String
'Input Column Letter
ColumnLetter = "AG"
'Convert To Column Number
ColumnNumber = Range(ColumnLetter & 1).Column
'Display Result
MsgBox "Column " & ColumnLetter & " = Column " & ColumnNumber
End Sub