Sub Test2()
Dim col As Long
For col = 5 To 7 'Columns E, F, and G
'find minimum slope where y-values are in row 29, and the x-values are in row 21
slope2 = (Cells(29, col) - Cells(29, col - 1)) / (Cells(21, col) - Cells(21, col - 1))
If col = 4 Then GoTo Passem
If slope2 = 0 Then 'The 'y' value may be a little low unless you have sufficient points on the curve in the Apex area.
MsgBox ("The location of the Apex is x = " & Cells(21, col) + ((Cells(21, col) - Cells(21, col - 1)) / 2) & " and y = " & Cells(29, col))
Exit Sub
End If
If slope2 < 0 Then
MsgBox ("The location of the Apex is x = " & Cells(21, col - 1) & " and y = " & Cells(29, col - 1))
Exit Sub
End If
Passem:
slope1 = slope2
Next col
End Sub