WorksheetFunction.Index (Excel)

Returns a value or the reference to a value from within a table or range. There are two forms of the Index function: the array form and the reference form.

Index (Arg1, Arg2, ..., Arg4)


Dim dblArg2() As Double: dblArg2() = 
Dim arrIndex() As Variant
arrIndex() = WorksheetFunction.Index(Arg1:=, Arg2:=dblArg2())

Arguments

Arg1, Arg2, ..., Arg4

Arg1 - Array or Reference - a range of cells or an array constant. For references, it is the reference to one or more cell ranges

Arg2 (Double) - Row_num - selects the row in array from which to return a value. If row_num is omitted, column_num is required. For references, the number of the row in reference from which to return a reference.

Arg3 - Column_num - selects the column in array from which to return a value. If column_num is omitted, row_num is required. For reference, the number of the column in reference from which to return a reference

Arg4 - Area_num - only used when returning references. Selects a range in reference from which to return the intersection of row_num and column_num. The first area selected or entered is numbered 1, the second is 2, and so on. If area_num is omitted, Index uses area 1