Formualizer Docs
ReferenceFunctionsLookup Functions

CHOOSE

CHOOSE: Returns one value from a list using a 1-based index.

Summary

CHOOSE selects from value1, value2, ... based on index_num.

Remarks

  • index_num is 1-based and is truncated to an integer.
  • Indexes less than 1 or greater than the number of choices return #VALUE!.
  • Errors in index_num are propagated.
  • The selected argument is returned as-is, including non-text/non-numeric values.

Examples

Select a label
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
Medium
Use numeric choices
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
30

FAQ

How are decimal index_num values handled?

The index is truncated toward zero before selection, so CHOOSE(2.9,...) selects the second argument.

What error do I get for index_num 0 or too large?

CHOOSE returns #VALUE! when index_num is less than 1 or greater than the number of provided choices.

Runtime metadata

Category

Lookup

Signature

CHOOSE(arg1: Number, arg2: Any)

Arity

min 2, max 2

Arguments

arg1

Number · Scalar · coercion NumberStrict

arg2repeating 1

Any · Scalar

Caps

PURELOOKUP

Source

On this page