+ Reply to Thread
Results 1 to 8 of 8

Macro to convert multiple-line cells to indivual rows.

  1. #1
    Registered User
    Join Date
    11-19-2014
    Location
    Denver, Colorado
    MS-Off Ver
    2010
    Posts
    5

    Macro to convert multiple-line cells to indivual rows.

    I'm trying to take a spreadsheet that contains some cell columns that has multiple row cells and convert each of those cells to their own row while copying the rest of the data in that row to the new rows.

    example.PNG
    Attachment 359895
    Last edited by theairhockeyguy; 11-19-2014 at 03:35 PM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Macro to convert multiple-line cells to indivual rows.

    Try this:-
    NB:- This code will alter your Data.
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    11-19-2014
    Location
    Denver, Colorado
    MS-Off Ver
    2010
    Posts
    5

    Re: Macro to convert multiple-line cells to indivual rows.

    I tried this and it deleted the multi rows but it only created one row after. I need a row for each different value in the multi row column. Just to clarify, for the columns in my example that have the 3 rows in one cell, each line has a different value. I would need to turn this one row into 3 rows.

  4. #4
    Registered User
    Join Date
    11-19-2014
    Location
    Denver, Colorado
    MS-Off Ver
    2010
    Posts
    5

    Re: Macro to convert multiple-line cells to indivual rows.

    This may be a better example

    example2.PNG

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Macro to convert multiple-line cells to indivual rows.

    Try this:-
    Results sheet2
    Please Login or Register  to view this content.
    Regards Mick

  6. #6
    Registered User
    Join Date
    11-19-2014
    Location
    Denver, Colorado
    MS-Off Ver
    2010
    Posts
    5

    Re: Macro to convert multiple-line cells to indivual rows.

    This is great. Thank you!

  7. #7
    Registered User
    Join Date
    11-19-2014
    Location
    Denver, Colorado
    MS-Off Ver
    2010
    Posts
    5

    Re: Macro to convert multiple-line cells to indivual rows.

    Just to clarify, what does the number 3 represent in this code?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Macro to convert multiple-line cells to indivual rows.

    It is the offset columns from column "A",Offset 3 being column "D", I took that for the count of the Multiple lines in one cell.
    If your data changes and column "D" is not Multiline, then this line will need changing to reflect that.
    Although not covering all eventuallities , it was the easiest way when I was not sure how the data was laid out in all situations.

+ 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. To convert cells with break lines into multiple rows and columns
    By leong6033 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2014, 08:38 PM
  2. Need help with macro to convert multiple rows into one.
    By adwhitle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2014, 02:09 PM
  3. Convert Multiple Columns to Rows including blank cells
    By BJPhil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2014, 02:48 PM
  4. Macro to convert date range to individual line items (i.e. rows) in excel
    By violetmind in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-11-2014, 09:53 PM
  5. Convert long line into multiple rows
    By Shai in forum Excel General
    Replies: 2
    Last Post: 05-03-2009, 07:29 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