Description
The CHOOSE function returns a value based on its position among the sequence of given values.
The sequence mentioned above means the sequence in which we refer to the values in the CHOOSE function.
The CHOOSE function is an easy and understandable alternative for a lengthy “nested if” function.
=CHOOSE(index_num,value1,value2)
The CHOOSE function’s syntax has the following arguments:
- index_number Required.
This represents which “value argument” is to be selected.
Index_num must be one of the following
- A number between 1 and 254,
- Formula
- Reference to a cell containing a number between 1 and 254
Note: In case index_num is less than 1 or greater than the number of the last value in the sequence argument, CHOOSE returns the #VALUE! error value.
Further, if index_num is a fraction, it is automatically converted to the lower number.
Value 1 required, subsequent values are optional
The Excel can take a maximum of 254 values as argument inputs in the CHOOSE function.
1 to 254 value arguments from which 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.
NOTE: The CHOOSE function does not take a range or array as an alternative to the value sequence of arguments, and will return #VALUE error.