I have a big loop which scrolls through a lot of data concatenating, formatting, adding formulas etc.
i.e.
For i = 1 to lastrow
ActiveSheet.Range(Cells(i,2)).Value = etc etc
ActiveSheet.Range(Cells(i,5)).FormulaR1C1 = etc
If Right(ActiveSheet.Range(Cells(i,7)).Value,2)="XY" Then
ActiveSheet.Range(Cells(i,7)).Select
ActiveCell.EntireRow.Delete
i=i-1
lastrow = lastrow-1
Next i
End If
If ActiveSheet.Range(Cells(i,11)).Value = "FINAL" Then
ActiveSheet.Range(Cells(i,11)).Select
ActiveCell.EntireRow.Delete
i=i-1
lastrow = lastrow-1
Next i
End If
ActiveSheet.Range(Cells(i,15)).Value = etc etc
Next i
When I do the above it doesnt like the "Next i" lines that are in bold
Is there any way for me to jump to the top of the loop after I delete a row. Basically I have to go back to the top so that it looks at the earlier cells (i.e. (i,2) and (i,5)) once it has deleted the row and adjusted the counters