Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Number to Letter:

Function Col_Letter(lngCol As Long) As String
Dim vArr
vArr = Split(Cells(1, lngCol).Address(True, False), "$")
Col_Letter = vArr(0)
End Function

Sub Range_End_Method()
Dim lCol As Long
lCol = Cells(1, Columns.Count).End(xlToLeft).Column

MsgBox "Column Letter" & Col_Letter(lCol)

End Sub

Letter to Number:

Sub Sample()
    ColName = "C"
    Debug.Print Range(ColName & 1).Column
End Sub


Finding Last Used Column or Row

  • No labels