角度整理
(2022-05-27 15:02:31)Sub 提取整理()
Dim i, n, j, m, x, y, k, h, f, sum, a, c, d, p
'填写序号,以便将逆时针测的角度按照顺时针的编号顺序走,好提取数据
k = 1
'根据序号列,将特定区间的数值倒序排列,以便将逆时针测得的角度按照顺时针排列,方便后续提取
For f = c + 1 To Range("a65536").End(xlUp).Row Step 2 *
c
'把增加的辅助序号列删除
Columns("F:F").EntireColumn.Select
'每隔几行写数
For i = 0 To 17 '18*5行,此18行为任意数,根据观测数目和测回数改
For n = 1 To c
If Int(i / 2) * 2 = i Then
Sheet1.Cells(i * c + n, 6) = "盘左"
Else
Sheet1.Cells(i * c + n, 6) = "盘右"
End If
Next n
Next i
x = 1
For j = 1 To Range("a65536").End(xlUp).Row
If Cells(j, "F") = "盘左" Then
Cells(x, "G") = Cells(j, "C")
Cells(x, "H") = Cells(j, "D")
Cells(x, "I") = Cells(j, "E")
x = x + 1
End If
Next j
y = 1
For m = 1 To Range("a65536").End(xlUp).Row
If Cells(m, "f") = "盘右" Then
Cells(y, "j") = Cells(m, "c")
Cells(y, "k") = Cells(m, "d")
Cells(y, "l") = Cells(m, "e")
y = y + 1
End If
Next m
For p = 1 To c - 2
sum = 0
End Sub
后一篇:科维全站仪测量

加载中…