Code to select range and fill down

erock24

Well-known Member
Joined
Oct 26, 2006
Messages
1,163
I am working on a macro and I need to go to the bottom of a range that starts at D3 then over to F. So, I have this
Code:
Range("D3").Select
    Selection.End(xlDown).Offset(0, 2).Select

But then I need to select F:I and fill down the formulas in F3:I3.
I know it will be some kind of Range(Selection, Selection.End(xlUp)).Select
Selection.FillDown. I don't know how to put it all together.
Thank you for your time and help.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You should not need to Select anything.

Exactly what do you want to do?
 
Upvote 0
Code:
LR = Cells(Rows.Count, "D").End(xlup).Row
Range("F3:I" & LR).FillDown
 
Upvote 0
I figured it out:

Code:
Range("F3:I3").AutoFill Destination:=Range("F3:I" & Range("D" & Rows.Count).End(xlUp).Row), Type:=xlFillDefault

seems to do the trick.
cool!!
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,617
Members
449,039
Latest member
Mbone Mathonsi

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