+ Reply to Thread
Results 1 to 3 of 3

udf to convert <any text> to range name

  1. #1
    David
    Guest

    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. #2
    Roger Govier
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > Greetings,
    > Has anyone got a ready made UDF to convert say "2goa(T)" to "_goa_T_"
    > TIA
    > --
    > David




  3. #3
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > Greetings,
    > Has anyone got a ready made UDF to convert say "2goa(T)" to "_goa_T_"
    > TIA
    > --
    > David




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1