+ Reply to Thread
Results 1 to 3 of 3

Separating data from txt to columns

  1. #1
    Registered User
    Join Date
    01-14-2011
    Location
    Greece
    MS-Off Ver
    Excel 2003
    Posts
    11

    Separating data from txt to columns

    I have a txt with meteorological data with station names, longitude, latitude, etc. They are placed in columns, separated by commas, but the padding is done with empty spaces instead of tabs. I want to transfer the data to an excel sheet, but, obviously, they are not placed in separate columns. I was told that I can use Paste special to help me separate the data, but all I see is 2 options (Unicode text and text), none of which does what I want. So, my question has 2 parts.

    1. How can I create some "guidelines" to separate the various columns?
    2. What is the best way to remove empty spaces? I guess I could use the Replace option to remove them, but I wonder if there is another way?

    Thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Separating data from txt to columns

    The macro at this website will remove all leading/trailing
    and multiple interspersed char 32 space characters.
    It will also remove and/or convert char 160 non breaking
    spaces into standard char 32 space characters. It will
    work on text or numbers and the numbers will be
    converted to true numeric numbers.

    I use this macro dozens of times every single day!
    It's a real time saver.

    http://www.mvps.org/dmcritchie/excel/join.htm#trimall
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-14-2011
    Location
    Greece
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Separating data from txt to columns

    Thank you. I will give it a try. Another way I found is by selecting the column with the text and use the "Text To Columns" option from the Data tab.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Separating Data in Columns
    By leepallister in forum Excel General
    Replies: 10
    Last Post: 05-04-2013, 08:59 AM
  2. Separating Web Query Data Into Columns
    By Asthut in forum Excel General
    Replies: 2
    Last Post: 11-20-2011, 05:56 PM
  3. Help separating data into columns
    By neal_dodd in forum Excel General
    Replies: 2
    Last Post: 12-16-2010, 06:24 AM
  4. [SOLVED] Separating data into columns
    By Jmarsh4 in forum Excel General
    Replies: 1
    Last Post: 07-01-2010, 12:49 PM
  5. Separating list of data into 2 columns
    By JLM in forum Excel General
    Replies: 2
    Last Post: 01-11-2007, 05:24 PM

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