|
'行列引用
Sub 列引用()
Columns(1).Select
Columns("b").Select
Columns("c:e").Select
End Sub
Sub 行引用()
Rows(1).Select
Rows("2").Select
Rows("3:4").Select
End Sub
Sub range行列表式法()
Range("1:1").Select
Range("2:4").Select
Range("a:a").Select
Range("b:d").Select
End Sub
Sub 简写法()
[a:a].Select
[b:d].Select
[1:1].Select
[2:4].Select
End Sub
Sub 全选()
Rows.Select '选择所有行
Columns.Select '选择所有列
Cells.Select '选择所单元格
i = Rows.Count
j = Columns.Count
k = Cells.Count
End Sub
Sub 动态引用使用区域()
a = Application.CountA(Columns(1))
b = Application.CountA(Rows(1))
Range("a1", Cells(a, b)).Select
End Sub
|
|