and from bob phillips
'-----------------------------------------------------------------
Function ColumnLetter(Col As Long)
'-----------------------------------------------------------------
Dim sColumn As String
sColumn = Split(Columns(Col).Address(, False), ":")(1)
ColumnLetter = sColumn
End Function
A simple one:
Sub Test()
colname = InputBox("Enter column")
'This is the one that does the trick
outp = Columns(colname).Column
MsgBox ("col no is " & outp)
End Sub
Thanks to all those who answered this. I only need one, but this will help
me also.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.