Returns a value from a list, given an index number.
Syntax
CHOOSE(index; value1; [value2]; ...)
value: The values from which one is to be returned. Can be a value, cell reference, or formula. E.g. "Sunday","2/2/19"
index: Specifies which values to return. For example, 1 returns value1, 2 returns value2, and so on.
Remarks
CHOOSE is flexible and can be combined with other functions. For example, it can be used along with RANDBETWEEN to create a random dataset (=RANDBETWEEN(1,5);"Value1";"Value2";"Value3";"Value4";"Value5").
Examples
Formula | Result |
=CHOOSE(1;2.3;3.6;6.8) | 2.3 |
=CHOOSE(A2;"Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday") | Sunday |
=CHOOSE(2;"1/2/19";"2/2/19";"2/3/19") | 2/2/19 |
Get a hands-on experience of the function in the embedded range below.
Possible Errors
Errors | Meaning |
#N/A! | |
#NAME! | The function name is incorrect or invalid. The given defined name (if any) is invalid. There is a typo in the defined name used in the function. Double quotes are missing for text values in the function. Colon missing in a cell range reference.
|
#VALUE! | The given argument's data type is incorrect or invalid. For example, the function =DATE(A1:A3) will return a #VALUE error when a text value is present in the range. The index value is either lesser than 1 or greater than the number of values given as input.
|
#REF! | |
Similar Functions
- OFFSET