发布网友 发布时间:2022-05-24 11:54
共2个回答
热心网友 时间:2023-10-12 12:56
看这样能不能满足要求呢:追答是否有累积误差可实际测试一下。
我的理解是不需要吧,因为用左上角的坐标加上当前单元个格的宽高,会得到一样的值。
Sub 坐标()
Dim i%
With ActiveSheet
i = .Range("a65536").End(xlUp).Row
.Cells(i, 1) = [c5].Top & "," & [c5].Left
.Cells(i + 1, 1) = [c5].Offset(1, 0).Top & "," & [c5].Offset(1, 0).Left
.Cells(i + 2, 1) = [c5].Offset(0, 1).Top & "," & [c5].Offset(0, 1).Left
.Cells(i + 3, 1) = [c5].Offset(1, 1).Top & "," & [c5].Offset(1, 1).Left
.Cells(i, 2) = [c5].Top & "," & [c5].Left
.Cells(i + 1, 2) = [c5].Top + [c5].Height & "," & [c5].Left
.Cells(i + 2, 2) = [c5].Top & "," & [c5].Left + [c5].Width
.Cells(i + 3, 2) = [c5].Top + [c5].Height & "," & [c5].Left + [c5].Width
End With
End Sub
热心网友 时间:2023-10-12 12:56
还有两个