+ Reply to Thread
Results 1 to 3 of 3

Copy Rows n times on new sheet

Hybrid View

jhall488 Copy Rows n times on new sheet 12-04-2014, 03:40 PM
Norie Re: Copy Rows n times on new... 12-04-2014, 03:43 PM
jhall488 Re: Copy Rows n times on new... 12-04-2014, 03:49 PM
  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    75

    Copy Rows n times on new sheet

    Hello,

    I am wanting to add a new sheet and copy each row of sheet1 5 times onto the new sheet. The data starts in A2 since the first row is the headers.

    Thanks

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Copy Rows n times on new sheet

    Perhaps.
    Sub Copy5()
    Dim rngSrc As Range
    Dim rngDst As Range
    
        Set rngSrc = Sheets("Sheet1").Range("A2")
    
        Sheets.Add
    
        Set rngDst = ActiveSheet.Range("A2")
    
        Do
            rngSrc.EntireRow.Copy rngDst.Resize(5)
            Set rngSrc = rngSrc.Offset(1)
            Set rngDst = rngDst.Offset(5)
        Loop Until rngSrc.Value=""
    
    End Sub
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-04-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Copy Rows n times on new sheet

    Thanks Norie. Does exactly what I was looking for.

+ 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. Copy rows x number of times into a new sheet
    By jeni_16 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-17-2013, 03:52 AM
  2. Copy rows X times
    By Siglen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2012, 04:58 AM
  3. Loop/copy rows variable times to new sheet
    By ianmaggy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2009, 07:18 AM
  4. I need a macro to copy each of 2000 rows 12 times in same sheet
    By Cyn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2006, 04:30 PM
  5. [SOLVED] Loop/copy rows variable times to new sheet
    By Patti in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-01-2005, 05:05 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