CHOOSE
Return one of up to 254 values, picked by an index number — the second value for 2, the fifth for 5.
Syntax
CHOOSE(index_num, value1, [value2], ...) | Argument | Required | Description |
|---|---|---|
index_num | Required | Which value to return, counting from 1. Fractions are truncated. |
value1 | Required | The value returned for index 1. |
value2 | Optional | Values returned for 2, 3 and so on. |
Examples
Every example below was executed against VisiGrid engine 0.51.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=CHOOSE(2,"a","b","c") | b | |
=CHOOSE(WEEKDAY(DATE(2026,9,29)),"Sun","Mon","Tue","Wed","Thu","Fri","Sat") | Tue | A weekday number turned into a name. |
=CHOOSE(2,B2,B3,B4) | 30 | The values can be cell references. |
=CHOOSE(4,"a","b","c") | #VALUE! | An index past the end of the list is an error. |
A short, fixed list
CHOOSE suits a handful of options that belong in the formula rather than in a
table: day and month names, quarter labels, a scenario switch between “low”,
“mid” and “high” assumptions:
=CHOOSE(2,"Q1","Q2","Q3","Q4") → Q2
When the list is long, or someone other than the formula’s author will need to
edit it, put it in cells and use INDEX instead. A list
in cells can be read and changed without editing a formula.
CHOOSE or SWITCH
CHOOSE picks by position, so the index must be 1, 2, 3… When the thing you
are matching on is a code or a name rather than a number,
SWITCH matches it directly.
Excel compatibility
Matches Excel, including #VALUE! for an index below 1 or past the last value and truncating a fractional index.