VBA: FillDown

DougStroud

Well-known Member
Joined
Aug 16, 2005
Messages
2,976
Office Version
  1. 365
Platform
  1. MacOS
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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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,224,427
Messages
6,178,588
Members
452,860
Latest member
jroberts02

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