Results 1 to 5 of 5

Copy range several times less first row

Threaded View

  1. #1
    Registered User
    Join Date
    06-28-2010
    Location
    Posen, Poland
    MS-Off Ver
    Excel 2000
    Posts
    46

    Copy range several times less first row

    Hi!
    I hope so, I choose a good forum with: Excel genral/miscellaneous/programming.
    My problem is: I want to copy n times, a range, for example range ("G1:H5") like this:
    --A-B-C-D-E-F-G-H
    1--------------------e--f
    2--------------x-o--x-o
    3-------c--r--c-r---c--r
    4-------e-u--e-u---e-u
    5-------l-m--l-m---l-m
    Now, I'm using below code:
    Sub copysteps()
        For i = 1 To 2 ‘two copies, make change
            Selection.Resize(Selection.Rows.Count - 1).Copy
            ActiveCell.Offset(0, -2).Select  
            ActiveSheet.Paste
        Next i
    End Sub
    but after use this code, the data looks like that:
    --A-B-C-D-E-F-G-H
    1-------e--f--e--f--e--f
    2-------x--o-x--o--x-o
    3-------c--r--c--r--c--r
    4--------------e--u-e--u
    5---------------------l--m
    Can you help me modify this code? Thanks.
    Regards
    Last edited by markos97; 06-28-2010 at 03:35 AM.

Thread Information

Users Browsing this Thread

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

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