OFFSET (shifted reference)

<< Click to Display Table of Contents >>

OFFSET (shifted reference)

Syntax:

OFFSET(Reference, Rows, Columns [, Height] [, Width])

Description:

Returns a cell reference shifted by the specified number of rows and columns. Optionally, the size of the Reference can also be changed.

Note: This does not physically move table cells, nor does it move the selection. The function only returns a shifted cell reference.

Reference is the cell reference to be evaluated. You can specify either a single cell or a cell range (in the notation StartingCell:EndingCell).

Rows is the number of rows Reference will be shifted. Positive values shift downwards, negative values shift upwards.

Columns is the number of columns Reference will be shifted. Positive values shift to the right, negative values shift to the left.

Height (optional) changes the height of Reference to the specified number of rows. Height must be a positive value.

Width (optional) changes the width of Reference to the specified number of columns. Width must be a positive value.

Example:

OFFSET(A1, 2, 0) returns a reference to A3

OFFSET(A1:C3, 1, 1) returns a reference to B2:D4

OFFSET(A1:C3, 1, 1, 5, 3) returns a reference to B2:D6

SUM(OFFSET(A1:C3, 1, 1, 5, 3)) returns the sum of the values in B2:D6

See also:

ADDRESS, INDIRECT, COLUMN, ROW