Returns a reference to a range that is a specified number of rows and columns from a given cell or range.
Sample Usage
OFFSET(C5,1,1)
OFFSET(D3,3,-2,1,1)
Syntax
OFFSET(reference, rows, columns, [height], [width])
- reference - The starting point from which to count the offset rows and columns.
- rows - The number of rows to offset by.
- columns - The number of columns to offset by.
- height - [OPTIONAL] The number of rows to return.
- width - [OPTIONAL] The number of columns to return.
Examples
OFFSET(C5,1,1) displays the value in cell D6.
OFFSET(D3,2,-2,1,1) displays the value in cell B6.
Notes
- rows and columns must be integers, but may be negative. If a decimal value is provided, the decimal part will be truncated.
- If the offset reference spills over the edge of the worksheet, OFFSET returns the #REF! error value.
- If height or width is omitted, it is assumed to be the same height or width as reference.
- OFFSET can be used with any function expecting a reference argument.