XLL+ Class Library (6.3)

CXlFuncs::Offset

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

static int Offset(
   CXlOper& xloOffsetRef,
   const CXlOper& reference,
   long rows,
   long cols,
   unsigned long height = 0,
   unsigned long 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