Range("G2:G" & lastrow).FormulaR1C1 = "=IF(RC[-6]="""","""",VLOOKUP(RC[-6],Proddata,MATCH(RC[-2],ProcessTimes!R1C2:R1C173,0),TRUE))"
does exactly the same as the loopFor Cntr2=2 to lastrow
Range("G" & Cntr2).Formula = "=IF(A" & Cntr2 & "="""","""",VLOOKUP(A" & Cntr2 & ",ProdData,MATCH(E" & Cntr2 & ",ProcessTimes!B1:FQ1,0),TRUE))"
Next Cntr2
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.