Alpha to Numeral column name
Sub Numerify()
Dim s As String, n As Long, r As Range
s = Application.InputBox(Prompt:="give me the letters", Type:=2)
Set r = Range(s & 1)
MsgBox (r.Column)
End Sub
--
Gary''s Student - gsnu200856
"danpt" wrote:
I need a macro or function to translate alphabetic column name to numeral
column number like:
Sub alphatonumeral()
Dim alpha, numeral As Variant
alpha = UCase(InputBox(prompt:="What is the alphabetic column name?"))
' translation body will be similar to formula "=column(BA:BA)" if input
alpha is BA
numeral = 53 ' for BA
MsgBox numeral
End Sub
|