View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
FiluDlidu FiluDlidu is offline
external usenet poster
 
Posts: 66
Default Remove any letter from a referenced cell

I'm not sure how exactly it works, but it works.

That's too bad because I would otherwise play on variations of the same
thing and use it for other applications.

Anyways, thanks for your reply!

"Ron Rosenfeld" wrote:
============================
Option Explicit
Function RemAlpha(str As String) As String
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "[A-Za-z]+"
RemAlpha = re.Replace(str, "")
End Function
============================
--ron