Draging Rows at the same time on another worksheet

Mstg007

Active Member
Joined
Dec 30, 2013
Messages
383
.I have created a basic VBA macro that I want to do the basic function.

But I would like the user to choose the range then end on the last row that
the user has selected.


Is this possible?

Code:
Sub DRAG_DOWN()
    Rows("21:21").Select
    Selection.AutoFill Destination:=Rows("21:22"), Type:=xlFillDefault
    Rows("21:22").Select
    Range("A23").Select
    Sheets("Ration").Select
    Rows("21:21").Select
    Selection.AutoFill Destination:=Rows("21:22"), Type:=xlFillDefault
    Rows("21:22").Select
    Range("A23").Select
    Sheets("Struct").Select
    Rows("12:12").Select
    Range("C12").Activate
    Selection.AutoFill Destination:=Rows("12:13"), Type:=xlFillDefault
    Rows("12:13").Select
    Range("C14").Select
    Sheets("STM").Select
    Range("A16").Select
End Sub
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,195,671
Messages
6,011,077
Members
441,581
Latest member
rp4717

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