b = NPI + 1
For i = 1 To b
If i = 1 Then L(1) = Sqr((XPI(1) - XSP) ^ 2 + (YPI(1) - YSP) ^ 2)
If i = b Then L(b) = Sqr((XPI(b) - XFP) ^ 2 + (YPI(b) - YFP) ^ 2) + L(b - 1)
L(i) = Sqr((XPI(i) - XPI(i - 1)) ^ 2 + (YPI(i) - YPI(i - 1)) ^ 2) + L(i - 1)
Next i
ı want to write the valu of L(i) to the specified point (i.e Sheets("st - km").Cells((i + 2), 7) ) how can ı do this ?
Bookmarks