Syntax
=CHOOSE(index_num, value1, [value2], ...)Arguments
| Argument | Required | Description |
|---|---|---|
index_num | Required | Which value to return, from 1 |
value1 | Required | The first value |
value2 | Optional | More values |
How to use CHOOSE
CHOOSE takes 2 required arguments and 1 optional argument, and accepts more values in the same pattern. Type =CHOOSE( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=CHOOSE(2, "a", "b", "c")Result =CHOOSE(4, "a", "b")Result Related lookup and reference functions
- ADDRESSBuilds a cell address as text from a row and column number.
- AREASReturns the number of areas (separate ranges) in a reference.
- COLUMNReturns the column number of a reference, or of the cell with the formula when left out.
- COLUMNSReturns the number of columns in a range or array.
- FORMULATEXTReturns the formula in a cell as text.
- GETPIVOTDATAReturns data from a pivot table. Refer to the pivot table cells directly instead.
- HLOOKUPLooks for a value in the first row of a table and returns the value in the same column from another row.
- INDEXReturns the value or reference at a given row and column of a range or array.
- INDIRECTReturns the reference written in a text value, such as "B3" or "Sheet2!A1:A10".