CHOOSE

Syntax:

CHOOSE ( index , argument-list )

Description: Selects the argument in argument-list that corresponds by position to index.

Arguments:

Name

Type

Description

index

number

An index into argument-list, truncated to an integer. The value of index shall be in the position range 1–n, where argument-1 is position 1, argument-2 is position 2, and so on up to argument-n. If index is an array, the value or every element in that array is evaluated, and if the formula was array-entered, the result is an array of chosen values.

argument-list

any

The arguments in any given argument-list need not all have the same type.

Return Type and Value: any, including array – The argument in argument-list that corresponds by position to index.

However, if the value of index is not an index into argument-list, #VALUE! is returned.

example:

SUM(CHOOSE(E1,F20:G20,H20:J24)) results in the sum of the elements designated by F20:G20 or H20:J24, as determined by the value of E1

If B9:B11 contain 1, 3, and 3, respectively, and CHOOSE(B9:B11,10,20,30) is array-entered into 3 cells, the values of those 3 cells is 10, 30, and 30, respectively.]