View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bearacade
 
Posts: n/a
Default how do I remove data from cells ex. (232)-555-1212 to 2325551212


Function NumOnly(AnyVal As String)
Dim RegEx
Set RegEx = CreateObject("vbscript.regexp")
RegEx.Global = True
RegEx.Pattern = "[^\d\s]+"
KillNonNum = RegEx.Replace(AnyVal, "")
Set RegEx = Nothing
End Function

=NumOnly(A1)


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=552748