Your code

Range("B2:B" & LastRow).FormulaR1C1 = "= VLOOKUP(A2,Reference!A:B,2,0)"
To be changed as

Range("B2:B" & LastRow).Formula = "= VLOOKUP(A2,Reference!A:B,2,0)"