View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Project Mangler Project Mangler is offline
external usenet poster
 
Posts: 63
Default Extract only text from column

Thanks Ron,

The UDF is a keeper.


As written, this UDF will eliminate everything that is not a letter in the
standard English alphabet; but the pattern can be easily modified.

=======================================
Option Explicit
Function GetText(s As String) As String
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Pattern = "[^A-Za-z]" 'removes any non-letters
re.Global = True
GetText = re.Replace(s, "")
End Function
=====================================
--ron