+ Reply to Thread
Results 1 to 2 of 2

Macro to copy block of rows XXX times based on number of non-blank rows on 2nd tab

  1. #1
    Registered User
    Join Date
    01-29-2009
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Macro to copy block of rows XXX times based on number of non-blank rows on 2nd tab

    New to macro/VBA.
    I have a worksheet (named "Details") with 6 rows of info for an account, from row#13 to row#18, and some of the rows have formulas. The second worksheet (named "Accounts") is a list of account names, which is entered by the user and each time may contain different number of accounts but always starts with row#2 (first row is column headers) and occupy consecutive rows.

    I need a macro that would count the number of rows in the "Accounts" tab (i.e. row# of last account less one), then go to "Details" tab to copy row 13-19 (19 is a blank row) a total of XXX times where XXX = number of account less 1. In other words, after copying, there will be a total of XXX blocks of accounts (including row 13-18), each block with a blank row below (i.e. row 13-18 is the original block, 19 is blank, 20-25 is second block, 26 is blank, 27-32 is 3rd block, 33 is blank .... etc.).

    Really appreciate any idea for a macro that would accomplish this.

  2. #2
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Re: Macro to copy block of rows XXX times based on number of non-blank rows on 2nd tab

    Maybe something similar to this?

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Copy rows/range and paste n number of times based on last used cell in Column A
    By skonduru in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2016, 02:30 PM
  2. [SOLVED] Copy block of rows based n times, n being list of items
    By sreeks in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2016, 11:29 AM
  3. How to create a macro to insert blank rows and copy data into blank rows?
    By zodiack101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2013, 01:18 PM
  4. [SOLVED] VBA Macro to copy acc no. down 'x" number of blank rows to next acc no. until last acc no.
    By mdlpjr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-06-2013, 11:26 PM
  5. [SOLVED] Need a Macro that will duplicate rows a number of times based on a column value
    By Lassitude in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2013, 12:04 PM
  6. Replies: 1
    Last Post: 11-19-2012, 04:16 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