+ Reply to Thread
Results 1 to 7 of 7

Comma Delim to Rows - Everything Else Copied

  1. #1
    Registered User
    Join Date
    05-10-2011
    Location
    Cornelius, NC
    MS-Off Ver
    MS Excel 2010
    Posts
    17

    Question Comma Delim to Rows - Everything Else Copied

    Hey Guys/Girls,

    I'm a first time poster, so please bear with me if I am not 100% spot on with my question.

    I have a spreadsheet of data that contains multiple item numbers (one per row) and one column in that list has comma-delim data (2 characters).

    It's currently taking 3 employees 2 whole days to sift through this report in order to extract what they need. If we are able to take this data (attached) and blow it out so that we create separate rows for each of the Product Code, it would save a ton of work.

    To summarize, I need a way to take all of the comma-delim 2-digit codes in Column O and make them go to one in each row, but also copy all of the data from the row it's in to the single row. In the current example, Row 2 would not change, then Row 3 would be Item 1234 and Product CodeAB along with everything else in the current row copied to that row. Then, Row 4 would be Item 1234 and Product Code AC with everything else in the current row copied to that row.

    Finally, the actual data set is 2,455 rows long before I would run the macro so the result could potentially be 400-500,000 rows of data. Also, I would need all columns to be copied over since all columns are used at some point in the data.

    P.S. I would like the macro to create the result in a new tab if at all possible....but it's not 100% required.

    Thanks so much to whoever can provide assistance.

    Take care.
    Attached Files Attached Files
    Last edited by JMcDon1007; 05-19-2011 at 08:01 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Comma Delim to Rows - Everything Else Copied

    Try this.

    Please Login or Register  to view this content.

    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.

  3. #3
    Registered User
    Join Date
    05-10-2011
    Location
    Cornelius, NC
    MS-Off Ver
    MS Excel 2010
    Posts
    17

    Re: Comma Delim to Rows - Everything Else Copied

    Quote Originally Posted by mrice View Post
    Try this.

    Please Login or Register  to view this content.

    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.
    Thank you so much for the help! I just now had a chance to get online and see if I got a reply so I will check out the information and let you know what happens.
    Take care,

    -John

  4. #4
    Registered User
    Join Date
    05-10-2011
    Location
    Cornelius, NC
    MS-Off Ver
    MS Excel 2010
    Posts
    17

    Re: Comma Delim to Rows - Everything Else Copied

    This worked! Thank you again for your help. I had to tweak a few things due to differences in subsequent sheets but overall it got me on the track I needed to be on. I appreciate all the help.

    Take care.

  5. #5
    Registered User
    Join Date
    05-10-2011
    Location
    Cornelius, NC
    MS-Off Ver
    MS Excel 2010
    Posts
    17

    Re: Comma Delim to Rows - Everything Else Copied

    I just uncovered an issue. I was stress testing this code with a high volume spreadsheet which would have produced well over 400,000 records. The macro ran fine; however, the spreadsheet is saved as a .xls file; therefore, it hits a wall at ~65,000 records. I know that the new Excel 2007 spreadsheets will accommodate a much greater volume of records.

    My questions are: If I simply save the original spreadsheet as a .xlsx file, then run the macro, will it produce the larger volume I'm looking for (past ~65,000 rows)? And if so, would there be any necessary changes in the code to facilitate the .xlsx file?

    Thanks again for all your help!

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Comma Delim to Rows - Everything Else Copied

    Hi JMcDon1007

    In Excel 2007, try saving the file as an xlsm (macro enabled) file. See if that helps. In reading the code as posted, it doesn't appear to require modification.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Registered User
    Join Date
    05-10-2011
    Location
    Cornelius, NC
    MS-Off Ver
    MS Excel 2010
    Posts
    17

    Re: Comma Delim to Rows - Everything Else Copied

    Thank you Sir! I also discovered that by simply saving the file as an Excel 2007 file would solve the issue. Per your instruction, I will mark this as closed.

    Thanks again to everyone for all of their help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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