+ Reply to Thread
Results 1 to 5 of 5

Text to columns with Fixed With but Keep Spaces

  1. #1
    Registered User
    Join Date
    08-08-2008
    Location
    ny
    MS-Off Ver
    365 version 2402
    Posts
    75

    Text to columns with Fixed With but Keep Spaces

    Hello everyone,

    Periodically I receive a file that I need to seperate the data into seperate columns using text to columns. When I go through the text to column wizard using the fixed to columns it displays exactly how I want the data devided up. When I click the finish button it removes the spaces.

    How can I do text to columns and retain the spaces. These characters are in important positions and need to stay there. I have uploaded a sample file just to help explain my problem.

    Stephen
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    149

    Re: Text to columns with Fixed With but Keep Spaces

    Fastest way I can think of.....
    • Make a note of where the splits should be (ie postion 13, position 21, etc).
    • Use "Replace All" to change spaces to some other character (like @ or * or &, something that doesn't otherwise occur in your data).
    • Do text to columns using your predetermined split positions.
    • Use "Replace All" to switch the characters back to spaces.

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Text to columns with Fixed With but Keep Spaces

    Perhaps not the most elegant solution, but you could always replace the spaces with some character , such as a "<",then do your text to columns, then relplace your "<" with a space.

  4. #4
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Text to columns with Fixed With but Keep Spaces

    Whoops...looks like masteff beat me to it!

  5. #5
    Registered User
    Join Date
    08-08-2008
    Location
    ny
    MS-Off Ver
    365 version 2402
    Posts
    75

    Re: Text to columns with Fixed With but Keep Spaces

    Thank you both. I think that will work.

    Stephen

+ 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