Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default udf to convert <any text to range name

Greetings,
Has anyone got a ready made UDF to convert say "2goa(T)" to "_goa_T_"
TIA
--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default udf to convert <any text to range name

Hi David

Not a UDF but a formula
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"2","_"),")", "_"),"(","_")
--
Regards

Roger Govier


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert text into range reference? McGonnagal Excel Worksheet Functions 5 April 30th 07 09:10 PM
Convert text in cell to a range name for formula Sawhney Excel Worksheet Functions 1 April 14th 06 01:06 AM
convert text to number for a range of data in a column Tom Excel Discussion (Misc queries) 9 October 31st 05 11:28 PM
convert a range of lowercase text to upper text or vice versa jackdaw Excel Worksheet Functions 2 May 16th 05 09:31 PM
Convert range of text to values Jill[_7_] Excel Programming 3 June 7th 04 12:47 PM


All times are GMT +1. The time now is 12:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"