Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How to replace " from this string with " "....

    AG."A"PISTOIA

    and i want to have this result:

    AG. A PISTOIA

    In effect i dont know is is 2 ' or "

    tks.

    note:
    the value is in variable dimensioned AS String...

    My_Var="AG."A"PISTOIA"

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    [quote name='sal21' post='768826' date='02-Apr-2009 11:57']How to replace " from this string with " "....

    AG."A"PISTOIA

    and i want to have this result:

    AG. A PISTOIA

    In effect i dont know is is 2 ' or "

    tks.

    note:
    the value is in variable dimensioned AS String...

    My_Var="AG."A"PISTOIA"[/quote]

    If you declared the variable that way and it works, then it's 2 ' rather than 1 "
    Replace(My_Var, "'", "")
    should work.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='rory' post='768837' date='02-Apr-2009 14:35']If you declared the variable that way and it works, then it's 2 ' rather than 1 "
    Replace(My_Var, "'", "")
    should work.[/quote]
    hI Rory...
    for me not work:-(

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='sal21' post='769352' date='06-Apr-2009 16:20']hI Rory...
    for me not work:-([/quote]
    Try

    Descr_Ramo_7_Banca = Replace(Descr_Ramo_7_Banca, Chr(34), "")

    Chr(34) is the double quote character ".

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='769363' date='06-Apr-2009 17:03']Try

    Descr_Ramo_7_Banca = Replace(Descr_Ramo_7_Banca, Chr(34), "")

    Chr(34) is the double quote character ".[/quote]

    ONLY YOU!
    Work fine, tks.

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    So you didn't actually have:
    Code:
    My_Var="AG."A"PISTOIA"
    at all, since that would not work with a double quote.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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