Range.Offset (Excel)

The Range Offset property returns a Range object that represents a range that's offset from the specified range.

In the example below, if the current active cell - the one selected - is B2, the returned cell will be E4. Positive values of RowOffset point to rows in the downwards direction, ColumnOffset to the right. Negative values point up or to the left respectively.

If the OffSet is points outside the space of the sheet, e.g. ColumnOffset:=-10 the program returns error 1004.

Offset (RowOffset, ColumnOffset)


Worksheets("Sheet1").Activate 
ActiveCell.Offset(RowOffset:=2, ColumnOffset:=3).Activate

Arguments

Optional arguments

The following arguments are optional

RowOffset (Long) - The number of rows—positive, negative, or 0 (zero)—by which the range is to be offset. Positive values are offset downward, and negative values are offset upward. The default value is 0.

ColumnOffset (Long) - The number of columns—positive, negative, or 0 (zero)—by which the range is to be offset. Positive values are offset to the right, and negative values are offset to the left. The default value is 0.