+ Reply to Thread
Results 1 to 9 of 9

Break One Column into Five

  1. #1
    Registered User
    Join Date
    06-16-2010
    Location
    Santa Fe, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    5

    Exclamation Break One Column into Five

    Hi,

    I am currently in the middle of a major project for my work that I'm excited to be working on except for a preliminary step of what amounts to torturous busy work.

    I have to create a spreadsheet of the following data formatted n eight separate columns:

    Date (MM/DD/YYYY)
    Name
    Address
    City
    ST
    Zip Code
    Occupation
    Amount

    The only problem is that my source formats it into just four columns:

    Date
    Name - Address, City ST #####
    Occupation
    Amount

    The 2nd column's formatting of " - " in between Name and Address; ", " between Address and City, and spaces between City/ST and ST/Zip is universal. I just need something that can break that one column into five.

    Normally, this kind of a task I would just do by hand but with 1000s of entries I could use a quick fix.

    Is there anybody kind enough to design a macro for charity to do this? I can use Excel 2007 or 2003 if that makes a difference.
    Last edited by nmlr; 06-17-2010 at 04:48 PM.

  2. #2
    Registered User
    Join Date
    06-16-2010
    Location
    Santa Fe, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Break One Column into Five

    Oh and I should note that I tried "Text to Columns" but the results were inconsistent due to the space deliminter (two word city names like Fort Lauderdale would be broken up into two columns instead of left as one).

  3. #3
    Registered User
    Join Date
    05-31-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Break One Column into Five

    have you tried fixed width?

  4. #4
    Registered User
    Join Date
    06-16-2010
    Location
    Santa Fe, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Break One Column into Five

    I have, but addresses and city names vary in length to the point where finding good break lines is equally impossible.

    I guess what I would need is something that would know to replace " - " ", " and ONLY the spaces before and after " ST " into breaks. I don't know if that's possible either.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Break One Column into Five

    Post a sanitized workbook with a meaningful-sized sample of data.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    06-16-2010
    Location
    Santa Fe, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Break One Column into Five

    Alright.... here's a small santized sample with two common corporate addresses... the first sheet is the source and the second is what I need to get it to look like
    Attached Files Attached Files

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Break One Column into Five

    Select H3:L3 and array-enter =x(C3) and copy down.

    This would be better implemented with regular expressions ...
    Please Login or Register  to view this content.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Break One Column into Five

    Or, with regular expressions,

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-16-2010
    Location
    Santa Fe, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Break One Column into Five

    Thank you so much! The first one works perfect!

+ 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