Results 1 to 3 of 3

Thread: How to get rid of Spaces after a number in Excel

  1. #1
    Join Date
    Feb 2012
    Posts
    9

    How to get rid of Spaces after a number in Excel

    I have copy some data from a website. And copy to Excel Sheet. Now i trying to Sum the total of column but neither Autosum nor Sum Function Work. There are Space after the Numbers. I tried Trim Function but it is not Working. =trim(A1). Anybody can help me.

  2. #2
    Join Date
    May 2011
    Posts
    523

    Re: How to get rid of Spaces after a number in Excel

    There are some changes that can be helped. Try =trim() will return text and =--trim() will coerce things that look like numbers to numbers. But there are other "white space characters" that aren't really spaces: =--trim(substitute(a1,char(160),"")) / =char(160) is that HTML non-breaking space.
    But instead of using formulas, maybe you could:
    Code:
      
    select the range to fix
    edit|replace:
    what: (space character)
    with: (leave blank)
    replace all
    Code:
      
    and to fix the HTML non-breaking character:
    select the range to fix
    edit|replace:
    what: alt-0160
    with: (leave blank)
    replace all
    Hit and hold the alt key while you type 0160 on the numeric key pad.

  3. #3
    Join Date
    Aug 2011
    Posts
    695

    Re: How to get rid of Spaces after a number in Excel

    You can substitute fuction for the same. You can try using =SUBSTITUTE(A1," ","")&"". Try this function and just drag the entire content below. This will work out in many cases unless you are not having a large amount of data.

Similar Threads

  1. How to count number of characters in Excel
    By Bankebihari in forum Windows Software
    Replies: 6
    Last Post: 15-05-2012, 04:52 PM
  2. Sum up a number of matches in Vlookup in Excel
    By Abélard in forum MS Office Support
    Replies: 2
    Last Post: 24-02-2012, 06:58 PM
  3. How to fix a cell number in excel for mac os
    By Shaina Na in forum Windows Software
    Replies: 1
    Last Post: 08-01-2012, 11:25 AM
  4. How to find first occurance of a number in Excel
    By AZUL in forum Windows Software
    Replies: 3
    Last Post: 11-06-2009, 10:32 PM
  5. Adding number in Excel 2003
    By sivaranjan in forum Software Development
    Replies: 3
    Last Post: 08-12-2008, 07:41 PM

Tags for this Thread

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
  •  
Page generated in 1,750,982,507.40353 seconds with 16 queries