Contact

CHOOSE Function in Calligra Sheets: Select a Value by Position

Lookup Beginner Calligra Sheets

Use CHOOSE in Calligra Sheets to select one of several values with a 1-based index. Includes practical worksheets, checked expected outputs, boundaries, and official KDE evidence.

Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked

Quick answer: CHOOSE returns the argument in the position selected by an integer index. Position 1 refers to the first option, 2 to the second, and so forth. For example, =CHOOSE(2;"Ground";"Air";"Courier") is expected to return Air. This is an independently reasoned output grounded in KDE’s documented semantics, not a result captured from a running application. KDE handbook · KDE implementation.

Use it when a small, fixed list maps numeric codes to shipping methods, priority labels, price tiers, or other outcomes. For large lookup tables, a conventional lookup may be more maintainable.

Availability and version history

  • Introduced: Documented by 26.08.2; original introduction not established.
  • Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
  • Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.

Syntax and parameters

=CHOOSE(index; option1; [option2]; ...)

The handbook writes this as CHOOSE(index; parameter1; parameter2;...). The source registers at least two total arguments (one index plus one selectable value), and allows further options. Thus option2 is optional even though it appears in the documentation’s illustrative signature; there is no default for index or option1. Handbook · Registration.

Parameter Required? Type / meaning Notes
index Yes Integer position beginning with 1 Supplied directly or through a reference.
option1 Yes First value or expression Returned when index is 1.
option2, option3, … No Additional selectable values The implementation uses the position to return the corresponding supplied argument; no fixed upper number of options is documented in this registration.

The English KDE handbook uses a semicolon to separate arguments. Formula separators, decimal symbols and text translation may depend on the user’s locale; the alternative spellings were not tested in Calligra 26.08.2. Enter text choices in double quotation marks. Syntax evidence.

Reproduce the result: shipping options

Create the following worksheet, entering column B’s numbers as numbers, not text. These examples keep input types simple to avoid undocumented coercion.

Cell Enter Meaning
A1 Order Header
B1 Route code Header
C1 Shipping choice Header
A2 1001 Order ID
B2 1 First route
A3 1002 Order ID
B3 2 Second route
A4 1003 Order ID
B4 3 Third route

In C2, enter:

=CHOOSE(B2;"Ground";"Air";"Courier")

Copy the formula to C3:C4. The expected values are Ground, Air, Courier, respectively. The index picks one of the three strings. This follows directly from the indexed-argument return in KDE’s func_choose; it was not native-tested. Implementation.

To check without relying on a copied formula, enter =CHOOSE(1;"1st";"2nd") in an empty cell; KDE’s official handbook gives the expected result 1st. The handbook also gives CHOOSE(2;3;2;4) → 2. Official worked examples.

More formula examples

Formula Independently expected result Reason
=CHOOSE(1;"Low";"Medium";"High") Low First option.
=CHOOSE(2;"Low";"Medium";"High") Medium Second option.
=CHOOSE(3;"Low";"Medium";"High") High Third option.
=CHOOSE(2;5;12;20) 12 Numeric choice in position 2.
=CHOOSE(3;4;9;16) 16 Numeric choice in position 3.
=CHOOSE(1;99) 99 Registration permits only one selectable option.
=CHOOSE(B3;"Ground";"Air";"Courier") Air B3 was set to 2.

All outputs above are calculated or reasoned expectations, not claims of observed Calligra execution. KDE registration · KDE selection logic.

Advanced example: rate tables without nested IF statements

Suppose the shipping route code in B2 is 2 and the package count in D2 is 4. Use three illustrative per-package rates: 5, 12 and 20. In E2, enter:

=CHOOSE(B2;5;12;20)*D2

The independent arithmetic is 12 × 4 = 48, so 48 is the expected charge. To use the same mapping for other orders, copy the formula down, leaving the fixed rate options alone. Rates are illustrative, not actual courier prices.

A second useful pattern is a default message for invalid indexes:

=IFERROR(CHOOSE(B2;"Ground";"Air";"Courier");"Review route code")

When a numeric B2 is outside the available positions, the pinned implementation constructs Value::errorVALUE(); IFERROR is an official Calligra function, but the displayed application result and combined formula are not native-tested here. Do not rely on this as a tested production control without a live worksheet check. CHOOSE error branch · IFERROR definition.

Errors, boundaries and troubleshooting

Symptom or situation Source-supported explanation Action
Index 0 or negative func_choose checks num <= 0 and returns an internal value error. Use a 1-based index; check your code mapping.
Index higher than number of choices func_choose checks num > count_of_options and returns an internal value error. Add options or constrain codes to the supported positions.
Fractional index such as 1.9 The index is passed through Calligra’s integer converter; numeric conversion behavior should not be mistaken for documented fractional-index support. Supply positive whole numbers and test edge cases natively.
Text index such as "2" Conversion to integer is attempted, but parsing and locale can matter. Prefer numeric cell values; test text conversion separately.
Entire array or range chosen as an option The registration calls setAcceptArray(); this is not proof of spill behavior or cross-application compatibility. Check intended array output natively before relying on it.
Formula uses commas while documentation uses semicolons English handbook examples use semicolons. Start with the documented semicolon form and verify local settings.

Important error distinction: source code shows an internal Value::errorVALUE() at invalid index boundaries. We did not record the exact localized cell display, nor confirm evaluation order of unselected argument expressions. Avoid making performance or lazy-evaluation assumptions. Source · Integer converter.

Calligra, compatibility and validation status

  • Version scope: KDE’s official 26.08.2 release registry and pinned reference.cpp source; KDE’s application page lists the October 8, 2026 release. This is catalogue/source verification, not an installed-platform test. Release · Registration.
  • Platform: Calligra distribution availability depends on the installed package and operating system. Official source registration is not proof that a particular user’s Sheets build exposes the function. No Windows/macOS/Linux runtime test was performed in this review.
  • Aliases: The pinned official registry lists CHOOSE without an explicit alternate name. Capitalization variants are not separate functions.
  • Other spreadsheet programs: Similar-looking CHOOSE formulas are not evidence of Calligra’s coercion, array handling, separators or error display. No interoperability round-trip was performed.
  • What was checked: KDE handbook semantics, pinned XML help, function registration, index error checks, and independently reasoned scalar outputs. No native execution, screenshots or automated UI tests were performed.

Related guides: IF, IFERROR, INDEX, and MATCH. CHOOSE selects among fixed position-ordered arguments; INDEX/MATCH are more suitable when the choices live in a changing lookup range.

Official references and claim-level checks (accessed 2026-10-13)

  1. KDE Calligra Sheets function handbook — CHOOSE: purpose, syntax, integer index, worked examples.
  2. KDE 26.08.2 reference.xml CHOOSE entry: official help source and examples.
  3. KDE 26.08.2 reference.cpp registration: at least two arguments, array acceptance.
  4. KDE 26.08.2 func_choose implementation: positional indexing, internal value-error guard.
  5. KDE 26.08.2 ValueConverter::asInteger: index-conversion path; does not replace native testing.
  6. KDE application release listing: Calligra 26.08.2 dated 2026-10-08.