View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default udf to convert <any text to range name

'---------------------------------------------------------------------
Function ReFormat(Inp As String) As String
'---------------------------------------------------------------------
Dim oRegExp As Object

Set oRegExp = CreateObject("VBScript.RegExp")
With oRegExp
.Global = True
.Pattern = "[\\0-9(){}\[\]\ £\$%^&*]"
ReFormat = .Replace(Inp, "_")
End With
End Function



--

HTH

RP
(remove nothere from the email address if mailing direct)


"David" wrote in message
...
Greetings,
Has anyone got a ready made UDF to convert say "2goa(T)" to "_goa_T_"
TIA
--
David