XLL+ Class Library

CXlFuncs::Offset

Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells

[C++]
static int Offset(
   CXlOper& xloOffsetRef,
   const CXlOper& reference,
   long rows,
   long cols,
   unsigned short height = 0,
   unsigned short width = 0
);

Parameters

xloOffsetRef

A reference to a CXlOper that will contain the requested data if the macro succeeds.

reference

The reference from which you want to base the offset.

rows

Row offset.

cols

Column offset.

height

Desired height of resulting reference. Treated as missing if 0.

width

Desired width of resulting reference. Treated as missing if 0.

Return value

Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.

Remarks

See the Microsoft Excel on-line Help for full details about this function.

Requirements

Header: xlfuncs.h

See Also

CXlFuncs Class | CXlFuncs Methods