XLL+ Class Library

CXlFuncs::Index

Uses an index to choose a value from a reference or array

[C++]
static int Index(
   CXlOper& xloValue,
   const CXlOper& array,
   unsigned short row_num,
   unsigned short column_num
);
static int Index(
   CXlOper& xloValue,
   const CXlOper& reference,
   unsigned short row_num,
   unsigned short column_num,
   unsigned short area_num
);

Parameters

xloValue

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

array

Range of cells or an array constant.

row_num

Row in array from which to return a value. If row_num is 0, column_num must be non-zero. A zero value is treated as a missing argument.

column_num

Column in array from which to return a value. If column_num is 0, row_num must be non-zero. A zero value is treated as a missing argument.

reference

Reference to one or more cell ranges.

area_num

Range in reference from which to return the intersection of row_num and column_num.

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