Chenboy2

New Member
Joined
Sep 25, 2005
Messages
34
Office Version
  1. 365
Platform
  1. Windows
I'm trying to create a fill down macro for the range D4:D5028

Here's the code I have so far:

I got most of this online.

Thanks.


Sub FixParent()
'
' FixParent Macro
'


'
Dim lastrow As Long


lastrow = Range("D4:D5028").End(xlUp).Row
'ActiveCell.FormulaR1C1


' Selection.AutoFill Destination:=Range("Table1[Parent]")
Selection.AutoFill Destination:=Range("D4:D5028" & lastrow)
Range("D4:D5028").Select
'Range("D4").Select
'Selection.End(xlDown).Select
'ActiveCell.Offset(0, 1).Select
'Range(Selection, Selection.End(xlUp)).Select
'Selection.FillDown


End Sub
 
Code:
Sub vvv()
Range("D4:D5028").Formula = "=VLOOKUP(Actual!$C151,$CW$4:$CX$9,2)"
End Sub
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,530
Messages
6,120,071
Members
448,943
Latest member
sharmarick

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