+ Reply to Thread
Results 1 to 2 of 2

Insert new rows and copy over information based on number of lines in cell

  1. #1
    Registered User
    Join Date
    09-19-2017
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    1

    Question Insert new rows and copy over information based on number of lines in cell

    Hi All,

    I'm totally new to using Macros/VBA and have been assigned an arduous task of formatting a large number of spreadsheets. I'm pretty sure this process can be sped up a lot using a Macro but unfortunately I'm not sure how to start... so any help is greatly appreciated! I've outlined what I need to do and what I'd like the Macro to do below.

    Example.JPG

    The 'As Is' section illustrates the current format of the spreadsheet and the 'Target' illustrates what I'd like it to be.

    In summary I'd like the macro to:

    1. Insert x number of rows based on the number of line breaks (i.e. no. of Plans) in the cells of column D (Mitigation Plan).
    2. Split the number of entries in each row in column D so that there is one 'Plan' per row
    3. Copy this across to column B (Action Name)
    4. Copy the rest of the information as well

    I hope this is clear, if not please let me know!

    If anyone is able to help me with this thank you in advance!
    Attached Images Attached Images

  2. #2
    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: Insert new rows and copy over information based on number of lines in cell

    Hi rysg

    Welcome to the Forum!!!

    Unfortunately pictures are of little value.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.
    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.

+ 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. [SOLVED] VBA to generate # rows based on cell value and insert information
    By stevemills04 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2016, 01:25 PM
  2. Insert X number of lines based on value in one cell
    By STUARTXL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-26-2016, 02:17 PM
  3. Replies: 1
    Last Post: 05-30-2013, 06:29 PM
  4. [SOLVED] insert rows based on number in cell and copy the data down into the new rows
    By pziefle in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-05-2013, 11:19 AM
  5. Insert a number of rows based on a cell value and copy formulas on multiple worksheets
    By Charleneq40 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2012, 12:45 PM
  6. [SOLVED] Insert Multiple Rows Based Off Number in Cell and Copy Data From Above New Rows
    By tstell1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2012, 04:15 PM
  7. Replies: 0
    Last Post: 05-18-2012, 11:18 PM

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