AutoFill Macro Assistance

cartoonjess

New Member
Joined
Feb 9, 2018
Messages
1
Hello Everyone!

I would appreciate assistance on a Macro I am working on. I added Column D, into which data will be concatenated from Columns A, B, and C. I would like Column D to AutoFill with the Concatenate Formula in Cell D2 until the last cell of Column D that corresponds with the last populated cell in Column C. The command currently looks like this (this was based on today's report, but each day the length of the report changes) :

Range("D2").Select
Selection.AutoFill Destination:=Range("D2:D71")

I would also like to apply formatting and the like to the entire populated worksheet from Columns A to D (starting with Cell A1). The current range is:

Range("A1:D71").Select

Is there an easy way to make the range from the starting cell to the last populated cell in the column? I appreciate any assistance that can be provided and hope you have a great day!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try
Code:
Option Explicit


Sub FillDownMacro()
Dim LR  As Long
    LR = Cells(Rows.Count, "C").End(3).Row
    Range(Cells(2, "D"), Cells(LR, "D")).FillDown


    Cells(1, "A").Copy
    Range(Cells(1, "A"), Cells(LR, "D")).PasteSpecial Paste:=xlPasteFormats
End Sub
 
Last edited:
Upvote 0
If you post the formula you are using, it can be inserted into the code without the need for FillDown !!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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