CHOOSE function
Chooses a value from a list of values
Chooses a value from a list of values.
Syntax
CHOOSE(index_num, value1, [value2])Square brackets indicate optional arguments.
Arguments
| Argument | Required | Meaning |
|---|---|---|
| index_num | Yes | Specifies which value argument is selected. Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number between 1 and 254.
If index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.
If index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the #VALUE! error value.
If index_num is a fraction, it is truncated to the lowest integer before being used.1 |
| value1 | Yes | CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or text."Hello" |
| value2 | No · repeats | 1 to 254 value arguments."Univer" |
Try CHOOSE
Select the second value from a list
=CHOOSE(2,B2,B3,B4)Select the second value from a list. The result is checked against a separately authored expected value for the supplied table. You can edit the data to explore the rule.
Inspect the current formula
Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.
Read the formula, one argument at a time
Explore the written function calls and their inputs. The calculation result belongs to the complete formula.
CHOOSE · top-level call
=CHOOSE(2,B2,B3,B4)1 / 4 · index_num
Specifies which value argument is selected. Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number between 1 and 254. If index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on. If index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the #VALUE! error value. If index_num is a fraction, it is truncated to the lowest integer before being used.
CHOOSE reference ↗Follow the cells behind a result
Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.
The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.
Practice a complete task
Reference and compatibility
Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.