Originally Posted by
Aussiebear
How was the issue solved?
I was accidentaly using A2 instead of A3 in the Do Until loop and it was an infinite loop.
[VBA]
Sub three_point()
Set c11 = Range("A1")
Dim i As Integer
i = 2
p = 2
Do Until Range("A3") = ""
If Abs(Cells(i, 1).Value - Cells(i + 1, 1).Value) < Abs(Cells(i + 1, 1).Value - Cells(i + 2, 1).Value) Then
Cells(p, 8).Value = Abs(Cells(i, 1).Value - Cells(i + 1, 1).Value)
Cells(p, 9).Value = (Cells(i, 1).Value + Cells(i + 1, 1).Value) / 2
Cells(i + 1, 1).Delete shift:=xlUp
Cells(i, 1).Delete shift:=xlUp
i = 2
p = p + 1
Else
i = i + 1
End If
Loop
End Sub
[/VBA]