Dynamic range

mg_reich

Board Regular
Joined
Jun 4, 2004
Messages
82
I'm sure the info that I need is in a post somewhere, but I can't seem to find what I'm looking for.

I need to copy a row consisting of 4 cells and paste to a dynamic list. I am basically looking for a way to write a macro that finds the end of the list and pastes there.

Any ideas?
Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

mrhartley

Well-known Member
Joined
Mar 8, 2005
Messages
564
Hi, Is this any good to you?
Code:
Sub test()

Dim lastrow
lastrow = Range("A65536").End(xlUp).row
Range("A" & lastrow + 1).Select

End Sub
It will take you to the last empty row in your sheet. You can adapt it to work against other columns besides A and also to past with too.

Regards
Mark
 

mg_reich

Board Regular
Joined
Jun 4, 2004
Messages
82
No, I don't think that will work. There are multiple instances on one sheet. There are several lists on one sheet.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,834
Messages
5,855,901
Members
431,772
Latest member
dannyboi1

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