+ Reply to Thread
Results 1 to 4 of 4

Text to Rows

  1. #1
    Registered User
    Join Date
    10-24-2011
    Location
    Grand Forks, ND
    MS-Off Ver
    Excel 2010
    Posts
    2

    Text to Rows

    I have a workbook with a column that has a text string with multiple entries delimited by "**" and I would like to use a macro to 1) make each delimited entry its own row and 2) copy other adjacent fields downward into newly created rows. I know this is topic has received substantial input here already but I am very new to VBA and the code I've been able to find does not quite suit my needs. A brief example of the data is as follows (sorry if the spacing doesn't turn out):

    Native format:

    ID |Delimited field |GroupID
    685042 |251Aa:CCC** 331:C** 332A:CC |G329

    Desired format:

    ID |Delimited field |GroupID
    685042 |251Aa:CCC |G329
    685042 |331:C |G329
    685042 |332A:CC |G329

    In the real workbook see attached, there are more columns than I have listed here. The referenced macro correctly takes care of the delimited column, but fails to copy information down into newly created fields (eg, "ID" and "GroupID" fields). I know this will be real simple for some of you, but its beyond me. Please see attached workbook for the real data. Sorry if this issue is redundant and has been covered elsewhere...

    The output is probably best to a new sheet, I suppose.

    Thanks!!
    Attached Files Attached Files
    Last edited by srf1800; 10-25-2011 at 02:04 PM. Reason: Display issues

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Text to Rows

    hi, srf1800, please check attachment, save the file and run code "test"
    Attached Files Attached Files
    Last edited by watersev; 10-25-2011 at 07:24 AM.

  3. #3
    Registered User
    Join Date
    10-24-2011
    Location
    Grand Forks, ND
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Text to Rows

    Wonderful script, watersev! It worked like a charm. Thanks.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Text to Rows

    if the issue is solved, please mark the thread as Solved:

    Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

+ 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