I'm puzzled to why my code overshoots the last row. If I run it on a worksheet with 30,000 rows it fills down to about 300k. This sheet calculates all my clients trades. Little confused at which way would be the most efficient way to calculate, use a vlookup function on each row which i insert using VBA or by using VBA to just calculate the total and display in a cell. Here's my code:

```
Sub UPDATE()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
lastRow = Sheets("Closed Trades").Range("A" & Rows.Count).End(xlUp).Row
lastRow2 = Sheets("Open Orders").Range("A" & Rows.Count).End(xlUp).Row
With Sheets("Closed Trades")
    .Range("Q3:Q3" & lastRow).FormulaR1C1 = "=SUBSTITUTE(LEFT(RC[-13],10),""."",""/"")"
    .Range("R3:R3" & lastRow).FormulaR1C1 = "=SUBSTITUTE(LEFT(RC[-9],10),""."",""/"")"
    .Range("S3:S3" & lastRow).FormulaR1C1 = "=VLOOKUP(RC[-13],'Symbols & Spreads'!C[-18]:C[-16],3,FALSE)"
    .Range("T3:T3" & lastRow).FormulaR1C1 = "=VLOOKUP(RC[-14],'Symbols & Spreads'!C[-19]:C[-14],6,FALSE)"
    .Range("U3:U3" & lastRow).FormulaR1C1 = "=VLOOKUP(RC[-15],'Symbols & Spreads'!C[-20]:C[-13],8,FALSE)*RC[-14]"
    .Range("V3:V3" & lastRow).FormulaR1C1 = "=IF(RC[-2]=""eur"",RC[-1]*R6C25,RC[-1]/(VLOOKUP(RC[-2],C[2]:C[3],2,FALSE)))"
End With
With Sheets("Open Orders")
    .Range("T3:T3" & lastRow2).FormulaR1C1 = "=SUBSTITUTE(LEFT(RC[-17],10),""."",""/"")"
    .Range("U3:U3" & lastRow2).FormulaR1C1 = "=VLOOKUP(RC[-16],'Symbols & Spreads'!C[-20]:C[-18],3,FALSE)"
    .Range("V3:V3" & lastRow2).FormulaR1C1 = "=VLOOKUP(RC[-17],'Symbols & Spreads'!C[-21]:C[-16],6,FALSE)"
    .Range("W3:W3" & lastRow2).FormulaR1C1 = "=VLOOKUP(RC[-18],'Symbols & Spreads'!C[-22]:C[-15],8,FALSE)*RC[-17]"
    .Range("X3:X3" & lastRow2).FormulaR1C1 = "=IF(RC[-2]=""eur"",RC[-1]*R6C27,RC[-1]/(VLOOKUP(RC[-2],C[2]:C[3],2,FALSE)))"
End With

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub

```