+ Reply to Thread
Results 1 to 5 of 5

Removing Spaces

Hybrid View

  1. #1
    Registered User
    Join Date
    11-05-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Removing Spaces

    I have a file with one column of numbers. All of the numbers have a space after the last digit. Which will not allow me to do what i want with the data. Is there anyway to automate the removal of the spaces?

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: Removing Spaces

    http://www.excelforum.com/excel-gene...haracters.html

  3. #3
    Valued Forum Contributor
    Join Date
    08-23-2009
    Location
    Hampshire, UK
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    328

    Re: Removing Spaces

    Removed my post
    Last edited by Huron; 11-18-2009 at 03:03 PM. Reason: Better solution already posted

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Removing Spaces

    Alternative to Find & Replace suggested in the link:

    Enter a 0 in a cell, any empty cell will do.
    Copy the 0
    Select your numbers with trailing spaces
    Click Edit - Paste Special and tick the Add option
    Hit OK

    Viola. All cells are now numbers where before they were text.

    PS @ Huron, no need to retract a post just because you think someone else's is better. Ultimately, it's the OP who decides which solution is "best". But that depends on such a lot of things that I find it useful to choose from as many alternatives as possible. So, why not put it back?
    Last edited by teylyn; 11-18-2009 at 03:56 PM.

  5. #5
    Valued Forum Contributor
    Join Date
    08-23-2009
    Location
    Hampshire, UK
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    328

    Re: Removing Spaces

    My suggestion was to enter the formula
    =VALUE(TRIM(A1))
    into another column (assuming the numbers are in column A), copy this down, then copy and Paste Special - Values over the original numbers.

    This is a lot slower than the Find / Replace method.

+ 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