Trying to run a forloop to iterate a formula over some cells as part of a larger bit of code. Everything runs smoothly up until this point where I get the error :
"Method 'Range' of object'_Global' failed
"Method 'Range' of object'_Global' failed
VBA Code:
Dim LastRow As Long
LastRow = Cells(Rows.Count, "C").End(xlUp).Row
For i = 2 To LastRow
range("I" & i).Formula = _
"=(INDEX(Master!$B:$B,MATCH(salesorders_1!D" & i & ",Master!$E:$E,0))"
Next i