Copy rows to different sheet starting at a specific row.

  • I am having a little mental block (old age) finding a solution to this problem. I use the following code to copy entire rows from one sheet to another and this is pretty standard.

    Code
    rng.EntireRow.Copy Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)


    Assuming that Sheet2 is blank, this of course copies the rows to Sheet2 starting at Cell A2 and down column A. I would like to modify the code so that I can specify at which row the copy should start. For example, I might want to start the copy at A1 instead of A2, or at A10 instead of A2. Any help would be greatly appreciated.

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Re: Copy rows to different sheet starting at a specific row.


    Hello,


    The offset at the end of this line of code determines where the paste will occur. For instance if you change Offset(1, 0) to
    Offset(0, 0) then the paste will occur at A1. Please let me know if you need any other help on this or you dont understand.

  • Re: Copy rows to different sheet starting at a specific row.


    Thank you so much for your quick reply. Unfortunately, that won't work because when I'm copying multiple rows, I want each row to be copied below the other, hence the Offset(1,0). With Offset(0,0), the rows just overwrite each other until the last one appears.


    Also posted at: http://www.excelforum.com/exce…ecific-row.html?p=3287885

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Re: Copy rows to different sheet starting at a specific row.


    I was given a solution at http://www.excelforum.com/excel-prog...html?p=3287885. Here is the code:

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Re: Copy rows to different sheet starting at a specific row.


    i Have been parusing the forums trying to find something that would be similar to this but having the data only copy the row if a specific option is made. Eample say I have a cell c27 which would be the area of an abreviation it would have to read lets say FD if that specific abbreviation is used in that cell than the whole row a27:h27 would than copy onto another sheet. Going down each time depending on selection, the ones that need to transfer are in red and the attached sheet stating ep3 is where it would have to transfer. forum.ozgrid.com/index.php?attachment/54379/ See example attached for extra clarification but does that make sense?

  • Re: Copy rows to different sheet starting at a specific row.


    Hello anthonys213. According to Forum rules, you should not post your question in another person's thread. Please start your own thread and include a copy of your file with some sample data. Provide a detailed explanation of what you would like to see happen. Once you have done this, if you send me a private message with a link to your thread, I will be happy to have a look at it. Cheers. :smile:

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!