Hi guys,
I am trying to create a macro button which would autofill a vlookup code into a column
Keeps giving me run-time error 1004 object range failed?!
Is there an easier way to do this?
I am trying to create a macro button which would autofill a vlookup code into a column
VBA Code:
Dim lastrow As Long
lastrow = Range("A2").End(xlDown).Row
Range("B2:B" & lastrow).FormulaR1C1 = "=VLOOKUP(B2&,'Stk_Qty-LC'!A:F,5,FALSE)"
Columns("H:I").EntireColumn.AutoFit
Keeps giving me run-time error 1004 object range failed?!
Is there an easier way to do this?