Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Albuquerque, New Mexico, USA
    Posts
    233
    Thanks
    0
    Thanked 1 Time in 1 Post

    Leading spaces (2003 SP2)

    I am trying to get rid of leading spaces. I copied three colums of text from an Outlook email message, brought it into Excel, did Text to Columns, and am left with a varying number of leading spaces prior to the text in column C. The text could start with any letter. I have tried TRIM and CLEAN with no change. If I select a cell in column C, I can backspace from the start of the text to remove the spaces.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Leading spaces (2003 SP2)

    Perhaps the spaces are non-breaking spaces. Try this formula:
    <code>
    =TRIM(SUBSTITUTE(C1,CHAR(160)," "))
    </code>
    160 is the code for the non-breaking space.

  3. #3
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Albuquerque, New Mexico, USA
    Posts
    233
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Leading spaces (2003 SP2)

    Bingo!

    Excellent, thanks, Hans.

Posting Permissions

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