INDEX
Returns the value at a given position from an array, starting from 1.
Syntax
=INDEX(array, index)
=array[index]
Arguments
Argument | Type | Description |
---|---|---|
array | Array | The array of values from which to retrieve a value |
index | Number | The position within the array to get the value |
This formula also works with deeply nested arrays.
Examples
In the following examples, the selected shape is a group with 4 shapes in it, with the following text and values:
Text | Property 1 | Property 2 |
---|---|---|
Shape 1 | 1 | 10 |
Shape 2 | 4 | 18 |
Shape 3 | 2 | |
Shape 4 | 6 | 14 |
=CHILDREN."Property 1"[3]
→ 2
Returns the value in the third position of the "Property 1" in the current shape's children
=INDEX(CHILDREN."Property 2", 3)
→ 14
Returns the third value from the list of the current shape's children's "Property 2" data value
=CHILDREN."Property 3"[0]
→ #ERROR!
Returns an error as accessing array values is 1-based (starting from 1), not 0-based
Updated 7 months ago