Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
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
You have:
Range("G" & Cntr2).Formula = "=IF(A"&Cntr2&"="""","""",
It should be
Range("G" & Cntr2).Formula = "=IF(A"&Cntr2&"="""","""",