+ Reply to Thread
Results 1 to 5 of 5

Substitue Leaves Excessive Space, Cannot Use TRIM

  1. #1
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Substitue Leaves Excessive Space, Cannot Use TRIM

    Hi all,

    Using Excel 2007

    I need to check thousand of rows for amspersand "&" and Removit it if it exists.
    I tried SUBSTITUTE($A$1,"&",""), but leaves excessive space in the result.
    I cannot use TRIM() because there may be other existing excessive spaces that I need to retain in the final string.

    For example Snow White & The Seven Dwarves should be Snow White The Seven Dwarves

    Are there other options than SUBSTITUTE() or use SUBSTITIUTE() w/o the excessive spaces?

    thx
    w
    Kind regards,
    w

    http://dataprose.org

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Substitue Leaves Excessive Space, Cannot Use TRIM

    Hi goss,

    Would suggest you to use Ctlr + H (Find & Replace) option available in Excel.. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Substitue Leaves Excessive Space, Cannot Use TRIM

    How about SUBSTITUTE($A$1,"& ","") or SUBSTITUTE($A$1," & ","")?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    09-17-2009
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Substitue Leaves Excessive Space, Cannot Use TRIM

    Hey there! I would highlight the column you want to search, then hit ctrl f. Choose "Replace" tab from the top, then in the find box enter the ampersand (&) and in the replace box put your cursor in and hit the space bar. It should replace all "&" with " ". I hope that helps!

  5. #5
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Substitue Leaves Excessive Space, Cannot Use TRIM

    Thanks guys,

    Substituting "& " with "" works great!

    thx
    w

+ 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