Results 1 to 4 of 4

Copy and Paste Multiple times and loop

Threaded View

  1. #1
    Registered User
    Join Date
    11-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Copy and Paste Multiple times and loop

    Hello,

    I have a workbook with two Sheets.
    Sheet 1 has a list of Data which I want to copy into Sheet 2. Sheet 1's list is dynamic and the number of rows will always change. I want to be able to copy the data out of Sheet 1 starting from cell A2 and paste into Sheet 2 8 times so from cell A2 - A10, then move to the next one in Sheet 1 A3 copy to Sheet 2 A11 - A19.

    EG.

    Sheet 1

    A1
    Dog
    Cat
    Rabbit

    Sheet 2
    Dog
    Dog
    Dog
    Dog
    Dog
    Dog
    Dog
    Dog
    Cat
    Cat
    Cat
    Cat
    Cat
    Cat
    Cat
    Cat
    etc.

    I need this code to loop through Sheet 1 till it finds a break. Only one break will be present.

    Currently I am using 3 seperate codes, one which copys the data from Sheet 1 to Sheet 2 another code which inserts 7 rows under each line of data and the 3rd code copys the data however when it gets to the last row it does not know when to stop so keeps pasting down endlessly, alternatively if someone can help me with a solution in writing a code which I can let it know to stop pasting below is the code I am using.

    Sub CopyRows()
    '
    ' CopyRows Macro
    '
    
    '
    StartRow = 2
    
    Dim e As Range
    For Each e In ActiveSheet.UsedRange.Rows
    If Application.CountA(e) = 0 Then e.Value = e(0).Value
    If Range("A242") = False Then
    
    End If
    Next e
    End Sub
    Thanks heaps for the help!
    Last edited by Dnass; 11-21-2013 at 01:12 AM. Reason: code tags added

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 12-15-2012, 05:08 PM
  2. [SOLVED] Copy & Paste Multiple Times
    By jkelly228 in forum Excel General
    Replies: 4
    Last Post: 08-10-2012, 03:54 PM
  3. Copy and paste multiple times
    By Axcelerate in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2010, 09:24 AM
  4. Copy/Paste 30 Times or Loop?
    By GeorgY in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2009, 12:33 PM
  5. Copy and paste rows multiple times
    By Novis in forum Excel General
    Replies: 5
    Last Post: 03-21-2009, 11:43 AM

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