+ Reply to Thread
Results 1 to 4 of 4

Remove Spaces, Trim?

  1. #1
    Registered User
    Join Date
    12-09-2004
    Posts
    53

    Remove Spaces, Trim?

    I have a column with numbers I got from a web page table. There are two spaces in front of most of the numbers. I need to have all of them removed. I tried TRIM and that made it look like they were gone but then if I used a formula with the new cell it looked just the same. Is there a way to remove extra spaces before a number?

    Chuck.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Remove Spaces, Trim?

    very old post but maybe it will help for others
    try Power Query to trim leading and trailing spaces and replace multispaces to single space

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Remove Spaces, Trim?

    @Sandy666: As old as it is, the OP did not mention which space character. TRIM() should have cleaned up any CHAR(32) space characters from the text. Because the OP says that the data were from the web, I suspect that these were CHAR(160) space characters that TRIM() and CLEAN() don't work with. As a clarification, does Power Query work at cleaning CHAR(160) spaces from data that Excel's built in functions don't?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Remove Spaces, Trim?

    @MrShorty,
    just like you said, Power Query TRIM can be used with char32, 160 or any other. you can trim zeroes, letters and so on, it depends on you
    I use TRIM as a key word, not as an excel function name

+ 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