Contact

CHOOSE Function (Gnumeric)

Lookup Intermediate Gnumeric

Select a value by its one-based position with Gnumeric CHOOSE, including scenario controls, truncation and index errors.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

CHOOSE selects one of its supplied values using a one-based index. It can implement a small scenario selector, numbered label or short list of alternatives. The index describes a position; the function does not search the choices for a matching value.

Syntax and selection rules

=CHOOSE(index,value1[,value2,...])

Index 1 selects value1, index 2 selects value2, and so on. The index is truncated to an integer. A position below 1 or beyond the available choices returns #VALUE! in the inspected callback.

The implementation is a variable-argument callback; its inspected contract does not establish a fixed 30-choice limit. This guide does not infer an unlimited practical maximum. A small selector is easier to audit, while a large mapping often belongs in a lookup table.

Retained text examples

=CHOOSE(2,"Low","Medium","High")
=CHOOSE(1,"Red","Blue")

Results are Medium and Red. The selector is not counted as a choice: the second choice is the formula’s third argument overall. =CHOOSE(2.9,“Low”,“Medium”,“High”) also gives Medium after truncation. Validate whole-number selections rather than silently accepting an unintended fraction.

Worked numeric scenario

Put Conservative, Base and High in A2:A4, and 80, 100 and 125 in B2:B4. Enter scenario number 2 in D2. In E2 enter =CHOOSE(D2,B2,B3,B4), giving 100.

Changing D2 to 1 selects 80; changing it to 3 selects 125. The function chooses an existing value rather than interpolating. A selector of 4 fails because no fourth choice was supplied.

Keep labels and ordering together. Reordering the references changes what a scenario number means even if the formula still calculates. If the formula will be copied, =CHOOSE(D2,$B$2,$B$3,$B$4) fixes the three choice cells while leaving the selector relative.

Advanced behavior: selected expression only

The inspected callback evaluates the selected expression after reading the index. The control =CHOOSE(1,10,1/0) returns 10 because the failing second choice is not selected. Selecting that second choice would expose the error.

This can separate scenario calculations, but it does not justify leaving a promised scenario broken. Test every choice that a user is expected to select. Array selectors and elaborate external-reference constructions are outside this guide’s native controls.

For a short label list, keep the index and labels visible so another reader can verify the order. If a user wants to select by a text name rather than a position, a lookup or explicit conditional expression is a different interface.

Errors and troubleshooting

=CHOOSE(0,“Red”,“Blue”) returns #VALUE!. Check bounds and whether the selector is actually numeric. Text that looks like a number is not a reliable replacement for a numeric index in this callback.

For a wrong but valid label, count the choices starting at 1 and inspect each reference. For copied formulas, check whether relative references shifted. A correct-looking result does not establish that the scenario list still matches its labels after editing.

Availability and verification

Version coverage: Gnumeric 1.12.57 has the scoped checks below. The 1.12.62 evidence is a documentation/source check dated October 14, 2026.

  • Introduced: Original introduction not established. The earliest demonstrated support in this guide is 1.12.57.
  • Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-lookup function module must be included and enabled.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.

The executable contract is also present in the official Gnumeric 1.12.57 fn-lookup source. The saved source was originally retrieved on October 17, 2026 and re-inspected for this guide. The last functioning release is not established; support in a named version is not a retirement claim.

On October 17, 2026, Gnumeric ssconvert 1.12.57 recalculated a synthetic workbook in the C.UTF-8 locale. Scoped controls: =CHOOSE(2,"Low","Medium","High") → Medium; =CHOOSE(1,"Red","Blue") → Red; =CHOOSE(2.9,"Low","Medium","High") → Medium; =CHOOSE(0,"Red","Blue") → #VALUE!; =CHOOSE(1,10,1/0) → 10. These are native calculation-engine results, not GUI tests or screenshots. Other tutorial layouts and displayed outputs are independent expectations unless covered by these exact formulas. Input/output files, preserved formulas, raw values and hashes were retained. The XLSX importer logged an unused workbookProtection-element warning; changed-input controls and recorded results were checked.

Official references