Returns an element from a list of choices based on index.
Sample usage
CHOOSE(2,'A','B','C')
Syntax
CHOOSE(index, choice1, [choice2, ...])
-
index
– Which choice (of the up to 29 provided) to be returned.- If
index
is zero, negative or greater than the number of choices provided, the #NUM! error is returned.
- If
-
choice1
– A potential value to be returned. Required. May be a reference to a cell or an individual value. -
choice2, ...
– Additional values among which to choose.
See also
OFFSET
: Returns a range reference that shifts a specified number of rows and columns from a starting cell reference.
Examples
Uses an index
to return a value from the specified list of up to 30 values.