Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
Description
The KEY function is used to retrieve the key at a specified index from a collection or dictionary. The indexes are zero-based, meaning the first key is at index 0.
Syntax
KEY(collection, index)
The KEY function syntax has the following arguments:
- collection - Required. The collection or dictionary from which you want to retrieve the key.
- index - Required. The zero-based index of the key you want to retrieve.
Example
| Formula | Description | Result |
| =KEY({"a": 1, "b": 2, "c": 3}, 1) | Retrieves the key at index 1 from the collection | b |
| =KEY({"x": 10, "y": 20}, 0) | Retrieves the key at index 0 from the collection | x |
Errors
For a full list of formula errors, please read Formula errors.