Offset Property
Applies To
Range object.
Description
Returns a Range object that represents a range that's offset from the specified range. Read-only.
Syntax
expression.Offset(RowOffset, ColumnOffset)
expression Required. An expression that returns a Range object.
RowOffset Optional Variant. The number of rows (positive, negative, or zero) by which the range is to be offset. The default value is 0 (zero).
ColumnOffset Optional Variant. The number of columns (positive, negative, or zero) by which the range is to be offset. The default value is 0 (zero).
See Also
Address property.
Example
This example activates the cell three columns to the right of and three rows down from the active cell on Sheet1.
Worksheets("Sheet1").Activate
ActiveCell.Offset(rowOffset:=3, columnOffset:=3).Activate
This example assumes that Sheet1 contains a table that has a header row. The example selects the table, without selecting the header row. The active cell must be somewhere in the table before the example is run.
Set tbl = ActiveCell.CurrentRegion
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, tbl.Columns.Count).Select