CHOOSE Function (LibreOffice Calc)

Lookup & Reference Beginner LibreOffice Calc Introduced in LibreOffice 3.0
lookup reference selection dynamic-formulas conditional-logic

The CHOOSE function returns a value from a list based on a given index number. It is useful for conditional selection, dynamic outputs, and building compact lookup logic.

Compatibility

What the CHOOSE Function Does

  • Selects a value from a list based on an index
  • Works with numbers, text, ranges, and expressions
  • Useful for dynamic outputs and compact logic
  • Often used with MATCH, WEEKDAY, or other index‑producing functions

Syntax

CHOOSE(index; value1; value2; value3; ...)

Arguments

  • index:
    A number indicating which value to return (1 = first value).

  • value1, value2, …:
    The list of values to choose from.

Basic Examples

Simple selection

=CHOOSE(2; "Red"; "Green"; "Blue")
→ "Green"

Using a cell reference

=CHOOSE(A1; "Low"; "Medium"; "High")

With numbers

=CHOOSE(3; 10; 20; 30)
→ 30

Advanced Examples

Combine with WEEKDAY

=CHOOSE(WEEKDAY(A1); "Sun"; "Mon"; "Tue"; "Wed"; "Thu"; "Fri"; "Sat")

Combine with MATCH for dynamic lookup

=CHOOSE(MATCH(A1; {"A";"B";"C"}; 0); 100; 200; 300)

Use ranges as return values

=SUM(CHOOSE(2; A1:A5; B1:B5; C1:C5))

Use expressions inside CHOOSE

=CHOOSE(A1; A2*2; A2*3; A2*4)

Create a compact SWITCH‑like structure

=CHOOSE(A1; "North"; "South"; "East"; "West")

Dynamic formatting selection

=TEXT(A1; CHOOSE(B1; "0.00"; "#,##0"; "0%"))

Edge Cases and Behavior Details

CHOOSE is 1‑based, not 0‑based

  • Index = 1 → first value
  • Index = 2 → second value
  • Index = 0 → Err:502
  • Index > number of values → Err:502

Accepts:

  • Numbers
  • Text
  • Ranges
  • Expressions

Behavior details

  • Index is truncated if decimal (e.g., 2.9 → 2)
  • If index is text → Err:502
  • If index is an error → error propagates

Common Errors and Fixes

Err:502 — Invalid argument

Cause:

  • Index < 1
  • Index > number of values
  • Index is non-numeric

Fix:

  • Validate index
  • Wrap with INT() if needed
  • Use MATCH for controlled index generation

Unexpected result

Cause:

  • Decimal index being truncated

Fix:

  • Use ROUND or INT explicitly

Best Practices

  • Use CHOOSE for small, fixed lists
  • Use INDEX for large or dynamic lists
  • Combine with MATCH for flexible lookups
  • Use CHOOSE for compact conditional logic
  • Use CHOOSECOLS / CHOOSEROWS for array‑based selection
CHOOSE is perfect for compact, readable logic — especially when paired with MATCH or WEEKDAY to generate dynamic indexes.

Related Patterns and Alternatives

  • CHOOSECOLS / CHOOSEROWS — array‑based selection
  • INDEX + MATCH — scalable lookup pattern
  • SWITCH (in other spreadsheet apps) — multi‑branch logic
  • IF / IFS — conditional branching

By mastering CHOOSE, you can build clean, compact, and dynamic lookup logic in LibreOffice Calc.

Copyright 2026. All rights reserved.