You can do it this way, I have never timed them but understand while/wend and do/loop are more effiecient then for /next. I also do not have a legitamate data array to test.
Do While X < 50 And Coord(X) = Coord(X - 1)
' Do STuff here
X = X + 1