+ Reply to Thread
Results 1 to 13 of 13

need to parse out a field with multiple items in field

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    Lawrenceville
    MS-Off Ver
    Excel 2010
    Posts
    31

    need to parse out a field with multiple items in field

    I have a download from our ERP system. It contains 11 fields. the 11th field, is a note/memo field that can contain up to XX number of unique order identifiers. In this field each unique identifier is separated by a space.

    I need to parse each unique identifier into it's own ROW. I have attached a file as an example. Any suggestions?

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: need to parse out a field with multiple items in field

    First the regular text to column on column K and after that I run this macro.

    I made some more headers to include all data.

    There are people who can make a more neat version, but this one works, I tested it.

    See the attached file.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: need to parse out a field with multiple items in field

    Hi RDE,

    Another Option:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: need to parse out a field with multiple items in field


  5. #5
    Registered User
    Join Date
    04-14-2014
    Location
    Lawrenceville
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: need to parse out a field with multiple items in field

    the last two are very nice solutions, but they do not copy the first 10 columns data when they parse column K. I need column A - J repeated for the parsing process. I will see if I can modify one of these macro's, if not the first solution does repeat column A - J. So in the meantime I can use it.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: need to parse out a field with multiple items in field

    Are you sure you have checked my code? The output is on desired data

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: need to parse out a field with multiple items in field

    AN EASY FIX:

    Please Login or Register  to view this content.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,378

    Re: need to parse out a field with multiple items in field

    Late to the party, as ever, but I was having so much fun working on this so I thought I'd share. A couple of variations on a theme. The first outputs the parsed data row by row, whereas the second outputs blocks of data for each input row.

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  9. #9
    Registered User
    Join Date
    04-14-2014
    Location
    Lawrenceville
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: need to parse out a field with multiple items in field

    yes thanks everyone, the solutions did copy the information Not sure what I did wrong.
    One issue, in my first example I never showed column K with a single ELAxxxxx item so when the above macro hits say cell K35 and it only has one value in column K it errors out. Not a big deal I just sorted the multiple value rows to the top and it worked great. Again many thanks to everyone.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,378

    Re: need to parse out a field with multiple items in field

    Both the solutions shown in Post #8 worked with a single entry in column K. I added a row of data to specifically test that condition.

    Whatever ...

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: need to parse out a field with multiple items in field

    I fixed my code for the one ELA value in Column K:

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    04-14-2014
    Location
    Lawrenceville
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: need to parse out a field with multiple items in field

    sorry I had not tested post 8 yet. I had to get the project done, so I had just come back to this. I have to do some work this weekend, but will test late sunday or first thing Monday morning.

  13. #13
    Registered User
    Join Date
    04-14-2014
    Location
    Lawrenceville
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: need to parse out a field with multiple items in field

    I just read your post in detail, I will mark the post completed, and do the thank you as you noted. thank you for the detailed instructions.

+ 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. Select Multiple Pivot Field Items in VBA
    By JungleJme in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2013, 01:36 PM
  2. Referencing Multiple Items from Pivot Field in macro
    By dgeisman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 01:01 PM
  3. Field Bottons & Multiple Items
    By JorgeU in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2005, 03:16 PM
  4. OLAP multiple page field items problem
    By opc10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2005, 02:29 AM
  5. OLAP multiple page field items problem
    By opc10 in forum Excel General
    Replies: 0
    Last Post: 04-22-2005, 02:26 AM

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