|Excel Developer Reference|
expression A variable that represents a Range object.
|RowIndex||Required||Variant||The index number of the cell you want to access, in order from left to right, then down. |
returns the upper-left cell in the range;
returns the cell immediately to the right of the upper-left cell.
|ColumnIndex||Optional||Variant||A number or string that indicates the column number of the cell you want to access, starting with either 1 or "A" for the first column in the range.|
Syntax 1 uses a row number and a column number or letter as index arguments. For more information about this syntax, see the Range
object. The RowIndex and ColumnIndex arguments are relative offsets. In other words, specifying a RowIndex of 1 returns cells in the first row of the range, not the first row of the worksheet. For example, if the selection is cell C3,
Selection.Cells(2, 2) returns cell D4 (you can use the Item property to index outside the original range).
This example fills the range A1:A10 on Sheet1, based on the contents of cell A1.
|Visual Basic for Applications|