Applies To
Range Object.
Description
Accessor. Returns a Range object that represents a range at an offset to the specified range.
Syntax
object.Offset(rowOffset, columnOffset)
object
Required. Return a range offset to this one.
rowOffset
Optional. Number of rows (positive, negative, or zero) by which to offset the range. If omitted, zero is assumed.
columnOffset
Optional. Number of columns (positive, negative, or zero) by which to offset the range. If omitted, zero is assumed.
See Also
Address Method.
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 you have a table on Sheet1 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 you run the example.
Set tbl = ActiveCell.CurrentRegion tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, tbl.Columns.Count).Select