+ Reply to Thread
Results 1 to 12 of 12

Extract Data from Column to 1 Rows for Importing

  1. #1
    Registered User
    Join Date
    12-02-2011
    Location
    Flowood, MS
    MS-Off Ver
    Microsoft Office Student 2010
    Posts
    10

    Extract Data from Column to 1 Rows for Importing

    Please see attached workbook.

    Address is in 1 column, and in order to import into another program, the address needs to be separated into individual columns on 1 row.

    Example:

    Name1 Name2 Address1 Address2 City State Zip
    Attached Files Attached Files
    Last edited by Bubba Howell; 12-08-2011 at 10:17 AM. Reason: Issue Solved

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Extract Data from Column to 1 Rows for Importing

    Perhaps this could be of help to you?

    To test it run macro "SplitData". As I'm not familiar with the US Zip code I've not split city and zip. Should "Bolton, MS 39041-8802" be split as
    "Bolton" and "MS 39041-8802" or should it be "Bolton" and "39041-8802"?

    Alf
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-02-2011
    Location
    Flowood, MS
    MS-Off Ver
    Microsoft Office Student 2010
    Posts
    10

    Re: Extract Data from Column to 1 Rows for Importing

    Thank you so much for your help.

    Yes, each should be split into separate columns as Bolton is the city, MS is the state, and 39041-8802 is the zip code.

  4. #4
    Registered User
    Join Date
    12-02-2011
    Location
    Flowood, MS
    MS-Off Ver
    Microsoft Office Student 2010
    Posts
    10

    Re: Extract Data from Column to 1 Rows for Importing

    I am new to this forum, how come I cannot see your attachment or the attachment I provided? Where would it be located?

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Extract Data from Column to 1 Rows for Importing

    It was there (i.e. yours and mine) but now it's gone. I guess it's the parts of the hiccups the excel forum goes through after the data base upgrade. I have down loaded your file and done my macro testing on it. What's now is missing is the last split "Bolton" "MS" and "39041-8802".

    It seems to me that you have not had a chance to test the macro I wrote since the file I uploaded seems to be gone. I'll post the macro code and upload the file so you can have a chance to test it yourself to if this is what you are looking fore.

    Normally attachments should be found at the end of one's post.

    Please Login or Register  to view this content.
    Alf

  6. #6
    Registered User
    Join Date
    12-02-2011
    Location
    Flowood, MS
    MS-Off Ver
    Microsoft Office Student 2010
    Posts
    10

    Re: Extract Data from Column to 1 Rows for Importing

    The test worked just as you indicated.
    Thank you so much for your help. That is exactly what I need to do.
    Is it possible to further separate the "City" - Bolton, "State"- MS, and "Zip Code"- 39041-8802 ?

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Extract Data from Column to 1 Rows for Importing

    Is it possible to further separate the "City" - Bolton, "State"- MS, and "Zip Code"- 39041-8802 ?
    It certainly is and if I can't help you there are a number of clever people in this forum who certainly can do it!

    I thought I had it solved but found not only "State" - MS but also PA and LA. Are there only a small number of possible states in your data or could any of the 52 be found in it?

    The "Zip Code" is it always in the form of 5 numbers + a hyphen + 4 numbers?

    Still you problem is quite interesting and I do like a challenge so I'm still working on it.

    Alf

  8. #8
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Extract Data from Column to 1 Rows for Importing

    Ok, here we go. I do think I've sorted out all the bugs and it splits the values the way you wanted but you better test it.

    As usual you run the macro "SplitData". Hopefully this workbook does not disappear.

    As I think this solves your problem could you please mark your thread "Solved" and if you would like to rate my answer click on the small star in the lower left corner of my last post.

    Just to be sure in case of the file disappearing I'll add the macro code as well.

    Please Login or Register  to view this content.
    Alf

  9. #9
    Registered User
    Join Date
    12-02-2011
    Location
    Flowood, MS
    MS-Off Ver
    Microsoft Office Student 2010
    Posts
    10

    Re: Extract Data from Column to 1 Rows for Importing

    Alf,

    I cannot tell you how much I appreciate your help. This saved me a large amount of time trying to figure this out myself when it is something I do not do. I used macros in excel some 20 years ago but it is all different now.

    Again, thanks,
    Bubba

  10. #10
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Extract Data from Column to 1 Rows for Importing

    Hi Bubba,

    Glad you liked it and found it helpful. Myself I gained a bit more Excel knowledge so to sum it up a typical win / win situation.

    Regards

    Alf

    Ps Don't forget to mark your thread "Solved"

  11. #11
    Registered User
    Join Date
    12-02-2011
    Location
    Flowood, MS
    MS-Off Ver
    Microsoft Office Student 2010
    Posts
    10

    Re: Extract Data from Column to 1 Rows for Importing

    I cannot figure out how? Could you again help me?

  12. #12
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Extract Data from Column to 1 Rows for Importing

    Sure, no problem
    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save
    Hope this helps

    Alf

+ 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