Results 1 to 7 of 7

Macro - copy and insert multiple rows

Threaded View

  1. #1
    Registered User
    Join Date
    07-01-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2010
    Posts
    15

    Macro - copy and insert multiple rows

    Hi,

    That is my first thread. I hope someone may be able to help me.

    I am trying to create a macro that breaks up data from one row into multiple rows while copying some of the other row's data. See the attached Excel file that has two spreadsheets – original data and desired output.

    In my original data spreadsheet rows have some info while some of these rows have replacing codes (in columns M onward) which are neither #N/A nor zeros (highlighted). I will call them actual replacing codes. The max number replacing codes may be 25.

    I want the macro to look at the number of actual replacing codes and then insert the same number of additional rows beneath the first row. There should be a separate row for each actual replacing code. If there are no actual replacing codes, no new rows should be added. The replacing codes should be added at the first column while info from B to K columns should be copied. The original M columns onward can be deleted or left for manual deletion.

    If it is not too complicated then "Y" should be inserted at the L column of the desired output spreadsheet to indicate that this row was added and the same actual replacing codes that where inserted at the first column should be added in column. If it is too complicated please ignore this part.

    The number of rows in the original data is not a fixed number so the macro should be able to recognize it. All cells are text (i.e not numbers).

    Any suggestions would be greatly appreciated! Let me know if there are any questions and thanks for all those who will try and help.


    Thanks much, Yoram
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to insert rows in multiple sheets and copy formulas
    By syt0x in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2013, 11:06 AM
  2. [SOLVED] Macro - copy and insert multiple rows
    By Shazzapg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-22-2013, 10:37 AM
  3. Excel Macro to insert two rows based on condition and copy and paste multiple cells
    By mannabhalo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-13-2012, 12:56 PM
  4. [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
  5. Replies: 2
    Last Post: 04-21-2011, 07:13 PM

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