Function Reference: CHOOSE

Syntax
=CHOOSE(index_num,value1,[value2]..[value254])
Purpose / Description
Returns one of a list of values, based on the value of the first argument.
Arguments
Name Type Description
index_num number A constant, reference or nested expression that provides an integer that indicates which value is to be returned.  It may be a number value between 1 and the number of return values provided.  Any decimal portion is ignored.
value1 any A constant, reference or nested expression that provides the value to be returned by the function if the value of index_num is 1.
[value2]...[value254] any Optional constants, references or nested expressions that provide the valuen to be returned by the function if value of index_num is n.
Return Values
Type Specific Value Description
any   The nth value, based on the value of index_num.
error #VALUE! If the value of index_num is < 1 or > count of result values provided or is not a number and cannot be coerced to a number.
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Advice: The advent of the SWITCH function simplifies the handling of the kind of problem that CHOOSE was often used for.  Instead of having to constrain the value of index_num to be an integer series starting with 1, SWITCH allows its solutions to be based upon the raw values of its first argument.
Examples: Open / download sample workbook: CHOOSE.xlsx