Selects the column in array from which to return a value. If
column is omitted, is required. For reference, the number of the column in reference from which to return a reference.
In This Topic
Gets a value or the reference to a value from within a table or range.
Syntax
'Declaration
Public Function Index( _
ByVal As Object, _
ByVal As Object, _
Optional ByVal column As Object, _
Optional ByVal As Object, _
Optional ByVal As IWorksheet, _
Optional ByVal As Integer, _
Optional ByVal contextColumn As Integer _
) As Object
'Usage
Dim instance As WorksheetFunction
Dim arg1 As Object
Dim row As Object
Dim column As Object
Dim area As Object
Dim worksheet As IWorksheet
Dim contextRow As Integer
Dim contextColumn As Integer
Dim value As Object
value = instance.Index(arg1, row, column, area, worksheet, contextRow, contextColumn)
Parameters
- arg1
- Array or Reference - a range of cells or an array constant. For references, it is the reference to one or more cell ranges.
- row
- Selects the row in array from which to return a value. If is omitted, column is required. For references, the number of the row in reference from which to return a reference.
- column
- Selects the column in array from which to return a value. If column is omitted, is required. For reference, the number of the column in reference from which to return a reference.
- area
- Used when returning references. Selects a range in reference from which to return the intersection of and column. The first area selected or entered is numbered 1, the second is 2, and so on. If is omitted, Index uses area 1.
- worksheet
- The context worksheet to calculate.
- contextRow
- The context row to calculate.
- contextColumn
- The context column to calculate.
See Also