this should work for you
![]()
Sub LoopInOut() i = 3 With Sheets("To Plot") .Range("A" & i).Value = .Range("E5").Value Do Until .Range("A" & i - 1).Value >= .Range("F5").Value And i > 3 If i > 3 Then .Range("A" & i).Value = Round(.Range("A" & i - 1).Value + .Range("G5").Value, 4) Sheets("GUI").Range("C10").Value = .Cells(i, 1).Value Application.Calculate .Cells(i, 2).Value = Sheets("GUI").Range("C15").Value .Cells(i, 3).Value = Sheets("GUI").Range("C14").Value i = i + 1 Loop End With End Sub
Bookmarks