CHOOSE

Uses index_num to return a value from the list of value arguments. Use CHOOSE to select one of up to 29 values based on the index number. For example, if value1 through value7 are the days of the week, CHOOSE returns one of the days when a number between 1 and 7 is used as index_num.

Syntax

CHOOSE(index_num,value1,value2,...)

Index_num   specifies which value argument is selected. Index_num must be a number between 1 and 29, or a formula or column reference containing a number between 1 and 29.

Value1,value2,...   are 1 to 29 value arguments from which CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, column references, formulas, functions, or text.

Remarks

Example 1

Col1Col2Col3Col4Formula Description (Result)
1st2nd3rdFinished=CHOOSE(2,[Col1],[Col2],[Col3],[Col4]) Value from the second argument Col2 (2nd)
NailsScrewsNutsBolts=CHOOSE(4,[Col1],[Col2],[Col3],[Col4]) Value from the fourth argument Col4 (Bolts)

Example 2

Col1Col2Col3Col4Formula Description (Result)
23451210=SUM([Col1], CHOOSE(2,[Col2],[Col3],[Col4])) Sums the two arguments Col1 and the result of the Choose function (35)