'''
Sub RngSelect()
Sheet1.Range("A3:F6,B1:C5").Select
End Sub
Sub cell()
Dim icell As Integer
For icell = 1 To 100
Sheet1.Cells(icell, 1).Value = icell 'Cells(x,y) 以x,y组合来定位一个单元格
Next
End Sub
Sub cell1()
Sheet1.Cells(1, 6).Select
[A5:F3] = Int(Rnd * 100) 'rng函数, 随机数(0-1)
Debug.Print [A5] '立即窗口显示
End Sub
Sub uselect()
Union(Sheet1.Range("A1:D4"), Sheet1.Range("D3:H8")).Select '选择不连续区域
End Sub
Sub urange()
Sheet1.Activate
Sheet1.UsedRange.Select '所有使用中的区域
End Sub
Sub crang()
Sheet1.Range("A1").CurrentRegion.Select '选择连续区域
End Sub
Sub crang2()
Sheet1.Range("A1").Offset(1, 5).Value = 10 'offset(x,y) 偏移,
'Range("A1").Offset(1, 5) 表示以A1单元格为基准,向下偏移1行,向右偏移5列
'Range("C3").Offset(-1, -1), offset可以向上,向前偏移,但要注意,不要超过A1
End Sub