+ Reply to Thread
Results 1 to 3 of 3

Import xls file, keep leading zero, get rid of spaces

  1. #1
    Forum Contributor rinser's Avatar
    Join Date
    02-27-2009
    Location
    Bucharest
    MS-Off Ver
    MS Office 2013
    Posts
    103

    Import xls file, keep leading zero, get rid of spaces

    Hi everybody,

    I have a problem which may seem simple but is daunting for me.
    I have a file in xls format that i need to import data from.
    The problem is with column A, (e.g. 0233 45) if I get rid of the spaces I loose leading zero, if I keep the zero I cannot get rid of spaces. The thing is I need both conditions satisfied.
    To summarize:

    1)Import file and delete columns B and C
    2)In column A get rid of spaces but keep leading zero (it's important to keep the zero where it exists, not add one). The length is different for each string in column A.

    Here is a small sample of the file that is imported
    import and convert.xls

    If anyone knows how to do it please share.
    Any help of idea will be appreciated.
    Last edited by rinser; 05-21-2009 at 12:10 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Import xls file, keep leading zero, get rid of spaces

    If you want to keep the leading zeroes and numbers are of varying lengths then I think you will need to store as text...

    Perhaps then:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor rinser's Avatar
    Join Date
    02-27-2009
    Location
    Bucharest
    MS-Off Ver
    MS Office 2013
    Posts
    103

    Re: Import xls file, keep leading zero, get rid of spaces

    Thank you for fast reply DonkeyOte!

    I have applied the solution and it works perfectly!

    Thank you very much!
    Cheers

+ 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