Not sure why it says cell values are not equal when they are equal. Following is my code and cell values are attached. I need to count cells values first and make sure first coordinate and last coordinate equal . Many thanks.
Sub coggv()
Dim i, j, tn As Integer
Dim a1, aa, ixv, iyv, cxx, cyy, cxv, cyv, cx1, cy1 As Double
n = 0
k = 0
aa = 0
ixv = 0
iyv = 0
cxx = 0
cyy = 0
u = 0
Do While Cells(6 + n, 12).Value <> ""
n = n + 1
Loop
tn = n
If (Cells(6 + tn - 1, 12) <> Cells(6, 12) Or Cells(6 + tn - 1, 13) <> Cells(6, 13)) Then
MsgBox ("Xn, Yn must be equal to X0, Yo")
Else
bla bla......
endif
Sub coggv()
Dim i, j, tn As Integer
Dim a1, aa, ixv, iyv, cxx, cyy, cxv, cyv, cx1, cy1 As Double
n = 0
k = 0
aa = 0
ixv = 0
iyv = 0
cxx = 0
cyy = 0
u = 0
Do While Cells(6 + n, 12).Value <> ""
n = n + 1
Loop
tn = n
If (Cells(6 + tn - 1, 12) <> Cells(6, 12) Or Cells(6 + tn - 1, 13) <> Cells(6, 13)) Then
MsgBox ("Xn, Yn must be equal to X0, Yo")
Else
bla bla......
endif