Ryan Hoofe
New Member
- Joined
- Jul 25, 2023
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Morning All,
Im looking to autofill a column from the last used row, this will vary day by day so im struggling with what the range should be as this will be variable each time? Sorry if this is a silly question I'm very new to VBA!
This is the code i have currently
Thanks
Im looking to autofill a column from the last used row, this will vary day by day so im struggling with what the range should be as this will be variable each time? Sorry if this is a silly question I'm very new to VBA!
This is the code i have currently
Rich (BB code):
Range("K1").Select
Range("K" & Rows.Count).End(xlUp).Offset(1).Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(R[-1]C[-2],'YTD EE'!C[-10]:C[-9],2,0)"
Range("L1").Select
Range("L" & Rows.Count).End(xlUp).Offset(1).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R[-1]C[-2],'YTD Supplier'!C[-11]:C[-10],2,0)"
Range("L305632").Select
Range("K1").Select
Selection.End(xlDown).Select
Selection.AutoFill Destination:=Range("K305631:K307455")
Range("K305631:K307455").Select
Range("L1").Select
Selection.End(xlDown).Select
Selection.AutoFill Destination:=Range("L305631:L307455")
Range("L305631:L307455").Select
Thanks
Last edited by a moderator: