+ Reply to Thread
Results 1 to 6 of 6

Formatting data.

  1. #1
    Registered User
    Join Date
    01-30-2006
    Posts
    12

    Formatting data.

    I am using a worksheet to analyse data that I am pasting in from a putty window. Due to the way the data is configured, after using text to columns with space as a delimiter, the last few columns won't match up and will start to spread out over 3 columns.
    What I would like to do is get the data to line back up again. I had thought of creating a macro to search for the data I'm looking for (which is a number between 10000 and 99999) in each row, then copy and paste back into the correct columns. Some of the columns contain data that I don't need so overwriting these isn't an issue, except that I'm not sure how to do it.
    Or is there a simpler/better way to do this.

    I've attached a sample file, the data I need to line up starts in column J but soon moves into I, on other data samples it has moved into K as well. The data in F,G and H is unneeded.

    Thanks in advance.

    Testdatanet.xls

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formatting data.

    A proper sample sheet doesn't need to be 809 rows of data. But it does need to have clear BEFORE/AFTER examples, usually on separate sheets. Slim that down a bit, not too much, make sure all variations are demonstrated, them manually mockup the AFTER based on the shorter set of sample data so we see exactly the final goal, removed columns as well.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-30-2006
    Posts
    12

    Re: Formatting data.

    Ahh, sorry about that. I've attached a file in the format you have asked for.


    Testdatanet2.xls

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formatting data.

    The TEXT TO COLUMNS feature has a "Fixed Width" option you should be using to split those rows correctly, not using the "delimited" option.

    We'll use a formula to detect those rows to delete first, delete them, then the Fixed Width Text To Columns does a great job.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-30-2006
    Posts
    12

    Re: Formatting data.

    Excellent! Thanks very much, this works a treat!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formatting data.

    I'll mark this SOLVED for you. Next time, you can do that with the THREAD TOOLS above.

+ 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