Seeking to copy then paste last two rows

auto.pilot

Well-known Member
Joined
Sep 27, 2007
Messages
711
Using XL07, I have the following, which is used to copy the last row, then paste in the next empty row.

Code:
Sub AddRowPV()
' don't look below row 55
    Range("A55").End(xlUp).EntireRow.Copy
    Range("A55").End(xlUp).Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Range("A1").Select
End Sub

For a differrent project, I need to copy the last two rows, then paste into in the next empty rows on the same sheet.

I've tried several variations, using offset but can't figure it out.

thanks for all suggestions.

jim
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,407
Hi,

Maybe this

Code:
Sub AddRowPV()
' don't look below row 55
    Range("A55").End(xlUp).Offset(-1, 0).Resize(2, 1).EntireRow.Copy
    Range("A55").End(xlUp).Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Range("A1").Select
End Sub

HTH

M.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,564
Messages
5,596,875
Members
414,106
Latest member
Tigretto

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top