"& ActiveSheet.Previous.Name &" doesn't work in the below formula to refer the values in previous sheet.
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(IF(VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "' !R2C10:R1000C12,3,FALSE)=R[2]C[5],"""",VLOOKUP(R[2]C[3],'" &...