A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hello. The GoTo statement is interfering with how VBA parses the loop, which triggers the “Loop without Do” error.
Remove the GoTo and exit the loop properly using Exit Do:
X = 1
Do
X = X + 1
If Range("n" & X) = 1 Or Range("o" & X) > 0 Then
Range("d3") = Range("s" & X)
Range("f1") = Range("t" & X) / 10
Range("d4") = Range("t" & X)
Range("f2") = Range("u" & X)
Range("f3") = Range("v" & X) / 10
Range("g4") = Range("w" & X)
If Range("o" & X) < 5 Then Range("d3") = Range("d3") + Range("o" & X)
If Range("o" & X) > 4 Then Range("g4") = Range("g4") + Range("o" & X)
End If
If X = 100 Then Exit Do
Loop