Hi, that is not the code I posted. You need:
Sub macro_1()
Sheets(1).Range("B1:B5").Formula = "=VLOOKUP(A1,Sheet2!$A$1:$B$5,2,0)"
End Sub