VBA: FillDown

DougStroud

Well-known Member
Joined
Aug 16, 2005
Messages
2,968
My code works for filling data down. I would like to perform the same w/ the formatting.
How would I alter the following code to include this?

Code:
Sub FillDown()
Dim ws1 As Worksheet
Dim LRow As Long
Set ws1 = Workbooks("Tgs Item Record Creator.xls").Sheets("Record Creator")
'Variable
LRow = ws1.Cells(Rows.Count, 8).End(xlUp).Row

With Range("a5:g" & Range("h" & Rows.Count).End(xlUp).Row)
       .FillDown
End With

With Range("S5:Y" & Range("h" & Rows.Count).End(xlUp).Row)
       .FillDown
End With

ws1.Calculate


End Sub

Thanks,

ds
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi, Doug,

did you try copy ?
Code:
Range("a5:g5").Copy Range("a5:g" & Range("h" & Rows.Count).End(xlUp).Row)

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,203,601
Messages
6,056,212
Members
444,850
Latest member
dancasta7

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