Need help Copying dynamic row ranges

ajr123

New Member
Joined
Apr 5, 2002
Messages
9
I am currently working on a project that
requires me to select a range of rows based on the last un used cell in one column which is linked to an access database. This data range changes dailly. When I try to do this it only allows me to select and copy either the top or bottom row of the data .Can someone help me figure this out . Thanks
The last formula I tried is:

Sub SELECT_ROW()
Rows("3:3").Select
Lastrow = Range("A65536").End(xlUp).Row
Rows(Lastrow & ":" & Lastrow).Select
Rows("3:3").Select
Lastrow = Range("A65536").End(xlUp).Row
Rows(Lastrow & ":" & Lastrow).Activate
Selection.Copy
End Sub
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
See if something like this is what you're after, if I understand you correctly:

Sub SelectRows()
Range([A3], [A65536].End(xlUp)).EntireRow.Select
End Sub

Since you are copying the rows, you can replace the word "Select" with the word "Copy", to save a step.

Any help?
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,769
Members
448,991
Latest member
Hanakoro

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