by
12k 31
2
6
3,189
3
Top 1% !
Popular
Famous
Tagged
Specified
OpenSource
Popularity: 4307th place

Published on:

LanguageVBA
Languagevbnet
LicenseMIT_X11

Get column letter Excel VBA

Given the column number, this function returns the letter(s) corrisponding to the excel column. Thanks to brettdj
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/464140/Get-column-letter-Excel-VBA?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
Function Col_Letter(lngCol As Long) As String Dim vArr vArr = Split(Cells(1, lngCol).Address(True, False), "$") Col_Letter = vArr(0) End Function 'test the code Sub Test() MsgBox Col_Letter(100) End Sub
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus