Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Note: There isn't a reason I can think of to use this because excel can accept column numbers, but here is the function regardless.


Finding Last Used Column or Row


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

  • No labels