In this example, the index number in the CHOOSE function is 3, meaning it returns "green", the third value listed.
=CHOOSE(B5,"red","blue","green") // returns "red"
In this example, the CHOOSE function has an index number specified by the cell B5. Because B5=1, the CHOOSE function returns the first value listed, which is "red".
The CHOOSE function selects a value from a list of up to 254 value arguments using an index number.
The CHOOSE function selects a value from a list of up to 254 items based on a value's position or index in the list.
Note that CHOOSE cannot get values from a range or array constant.
Note that CHOOSE will throw a #VALUE! error if index_num is not in range.
Frequently Asked Questions
What is the CHOOSE function?
CHOOSE is a Sourcetable function that selects a value from a list. The value that the CHOOSE function selects is based on position number.
How does the CHOOSE function work?
The CHOOSE function syntax is CHOOSE(index_num, value1, [value2], ...). The index_num argument specifies which value argument is selected, while the value1, value2, etc. arguments are values that CHOOSE selects from. The value that CHOOSE selects is based on the index_num provided.
What can the arguments be in the CHOOSE function?
CHOOSE takes many types of arguments. Arguments that CHOOSE works with include numbers, text, defined names, functions, formulas, and cell references.