Forum Discussion
Kai El Harrar
Dec 14, 2017Copper Contributor
Use VBA to Autofill a Row until the end of the number of data in another row
Hello,
I need some help with the following problem:
The Macro should select the first cell with the vlookup (AY2) and autofill the complete range in the column AY until the last row that ...
- Mar 25, 2019
Hi Haytham Amairah,
I was facing similar issues and chanced upon this thread. If i have two columns (O and P) that i wish to autofill via VBA, do I amend the code from:
Selection.AutoFill Destination:=Range("O2:P313")
Range("O2:P313").Selectto:
Selection.AutoFill Destination:=Range("O2:O" & Range("E" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
Selection.AutoFill Destination:=Range("P2:" & Range("E" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
Duan_90
Apr 22, 2020Copper Contributor
I've done it!
'Copy above formula to last row of Step 2 sheet
Selection.AutoFill Destination:=Range("A3:A" & Worksheets("Step 2").Range("A" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
Regards,
Duan
'Copy above formula to last row of Step 2 sheet
Selection.AutoFill Destination:=Range("A3:A" & Worksheets("Step 2").Range("A" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
Regards,
Duan
Haytham Amairah
Apr 22, 2020Silver Contributor