VBA for Copy and paste to last row

cufflink23

New Member
Joined
Dec 15, 2011
Messages
4
I want to copy and paste G2:M2 to the last row in that range. How do i write the code to paste the selection to the last row, defined by column A.
 
IvanDIP, though you private messaged me for help, have you tried njimack's suggestion in reply #2 of this thread?

What column defines your last used row?
What row do you want copied?

If only you can see your spreadsheet and you do not give sufficient details (e.g. sheet name, columns, what row number to copy), how should other people guess what you need if they can't see your PC screen?
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hello all,

I have a similar question.

I would like to copy the last twos rows in my table and paste them at the bottom (but above my total row).

The difference is that I have another button already in place that will add rows in between different rows of my table whenever the button is clicked, meaning that I don't have cell references for my two last rows as they will change all of the time.

Thank you in advance!
 
Upvote 0

Forum statistics

Threads
1,215,332
Messages
6,124,314
Members
449,153
Latest member
JazzSingerNL

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
Back
Top