OK, one more shot
Dim coord(50) As Single
Dim NewCoord(50) As Single
coord(1) = 1.234
coord(2) = 4.675
coord(3) = 3.777
coord(4) = 3.777
coord(5) = 11.024
coord(6) = 10.625
coord(7) = 3.98
coord(8) = 5.55
coord(9) = 5.55
coord(10) = 7.825
x = 1
Do While x < 11
If coord(x) = coord(x - 1) Then GoTo Skip
' Do Stuff here (I want to skip this part if the two above are equal)
d = d + 1
NewCoord(d) = coord(x)
Debug.Print d; NewCoord(d)
Skip:
x = x + 1
Loop
Stop
Result
1) 1.234
2) 4.675
3) 3.777
4) 11.024
5) 10.625
6) 3.98
7) 5.55
8) 7.825