Name

[Application.]Range([cell1],[cell2])

Synopsis

Returns a range of cells.

Argument

Setting

cell1

The upper-left corner of the range

cell2

The lower-right corner of the range

The three ways to specify the Range method are cell references, strings, or brackets. The following three lines all select the same range:

Range(Cells(1, 1), Cells(3, 3)).Select
Range("A1", "C3").Select
[A1:C3].Select

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.