Alpha with numeric and numeric only numbers in a column
Copy/paste this UDF to a general module in your workbook.
Function RemAlpha(str As String) As String
'Remove Alphas from a string
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "\D"
RemAlpha = re.Replace(str, "")
End Function
In a helper column enter
=RemAlpha(cellref)
Drag/copy down.
Gord Dibben MS Excel MVP
On Fri, 18 Sep 2009 11:53:01 -0700, rciolkosz
wrote:
I have a column with 2 alpha letters leading numbers and also numbers only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?
Example:
ar3456789
bt56789
234567
78901234
etc.
|