Hi,
I have a macro that does a VLOOKUP and then autofills the results to a specified column. However, if there are zero results from the VLOOKUP it fails with a Runtime error. Do you know if there is any way around this?
The code is below:
Range("D1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(C[-2],Sheet2!C[-2]:C[-1],2,FALSE)"
Selection.AutoFill Destination:=Range("D1:D" & lastrow)
Thanks
Bookmarks