+ Reply to Thread
Results 1 to 7 of 7

Search and Replace a specific character

  1. #1
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293

    Search and Replace a specific character

    Hello,

    In a cell(s) I have for example {text}dd%2BMore_Text}

    what i want to do is search and replace the final }

    so it should be {text}dd%2BMore_Text


    the regular search and replace in excel removes all } which is not what i need.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: Search and Replace a specific character

    Say that its in A1 in cell B1 try typing

    =LEFT(A1,LEN(A1)-1)

    Not sure if it will work so make sure you save before trying

  3. #3
    Forum Contributor
    Join Date
    02-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    172

    Re: Search and Replace a specific character

    if this works then simply delete row a1 after

  4. #4
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Search and Replace a specific character

    This is not my expertise but this seems to work:
    Assuming A1 contains the text to search.... and the final "}" is not necessarily the last character of the string...

    example {aaaaa}bbbb}ccc will return {aaaaa}bbbbccc

    Please Login or Register  to view this content.
    Last edited by tkowal; 06-01-2012 at 04:34 PM. Reason: Added conditions
    Ted
    "Live Long and Prosper"

  5. #5
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293

    Re: Search and Replace a specific character

    thanks guys, i figured it out.. IF(RIGHT(A1,1)="}",LEFT(A1,LEN(A1)-1),A1)

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Search and Replace a specific character

    Slightly shorter..

    Please Login or Register  to view this content.
    or even shorter

    Please Login or Register  to view this content.
    Last edited by Ace_XL; 12-09-2012 at 12:55 PM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Search and Replace a specific character

    =substitute(a1&" ","} ","")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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