Contact

CHOOSEROWS Function (LibreOffice Calc)

Lookup & Reference Intermediate LibreOffice Calc LibreOffice 25.8

The CHOOSEROWS function returns specific rows from an array or range. It is used for dynamic row extraction, array reshaping, and building flexible filtering and lookup workflows.

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

Availability and version history

  • Introduced: LibreOffice 25.8.
  • Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
  • Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
  • Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.

Version compatibility: CHOOSEROWS became available in LibreOffice Calc 25.8. It is not available in Calc 25.2 or older releases. See the official LibreOffice 25.8 release notes and function reference.

The **CHOOSEROWS** function extracts specific rows from a range or array. It is ideal for dynamic array reshaping, selective data extraction, and building flexible lookup or filtering pipelines.

What the CHOOSEROWS Function Does

  • Returns selected rows from a range or array
  • Supports multiple row indexes
  • Works with dynamic arrays
  • Useful for filtering, reshaping, and lookup preparation
  • A modern alternative to INDEX‑based row extraction

Syntax

CHOOSEROWS(array; row1; row2; row3; ...)

Arguments

  • array:
    The source range or array.

  • row1, row2, …:
    One or more row numbers to extract (1‑based).

Basic Examples

Extract a single row

=CHOOSEROWS(A1:D10; 3)
→ returns row 3

Extract multiple rows

=CHOOSEROWS(A1:D10; 1; 10)
→ returns rows 1 and 10

Using cell references

=CHOOSEROWS(A1:D10; A12)

Advanced Examples

Reorder rows

=CHOOSEROWS(A1:D10; 10; 1; 5)
→ row 10, row 1, row 5

Combine with FILTER

=CHOOSEROWS(FILTER(A1:D100; A1:A100>0); 1; 5; 10)

Combine with SORTBY

=SORTBY(CHOOSEROWS(A1:D100; 1; 3; 7); 2; -1)

Dynamic selection using MATCH

=CHOOSEROWS(A1:D10; MATCH("Total"; A1:A10; 0))

Extract every second row

=CHOOSEROWS(A1:D20; {1;3;5;7;9})

Use with XLOOKUP to return multiple rows

=XLOOKUP(E1; A1:A100; CHOOSEROWS(A1:D100; 2; 4))

Edge Cases and Behavior Details

CHOOSEROWS is 1‑based

  • Row 1 = first row
  • Row 0 → Err:502
  • Negative indexes → Err:502

Accepts:

  • Ranges
  • Dynamic arrays
  • Array literals

Behavior details

  • Returns a dynamic array
  • Row order is preserved based on the argument order
  • Duplicate row indexes are allowed
  • Out‑of‑range indexes → Err:502

CHOOSEROWS of an error → error propagates

Common Errors and Fixes

Err:502 — Invalid argument

Cause:

  • Row index < 1
  • Row index > number of rows
  • Non-numeric index

Fix:

  • Validate row numbers
  • Use MATCH to generate safe indexes

#VALUE! or #REF! in downstream formulas

Cause:

  • Array size mismatch

Fix:

  • Wrap with IFERROR or validate array dimensions

Best Practices

  • Use CHOOSEROWS for clean, readable row extraction
  • Use INDEX for column‑based extraction
  • Combine with FILTER, SORT, and SORTBY for dynamic pipelines
  • Use MATCH to generate row indexes programmatically
  • Use CHOOSECOLS for column extraction
CHOOSEROWS is perfect for reshaping data — especially when building dynamic dashboards, lookup tables, or filtered views.
  • CHOOSECOLS — extract columns
  • CHOOSE — select from a list
  • INDEX — flexible row/column extraction
  • FILTER — row filtering
  • SORT / SORTBY — ordering arrays
  • XLOOKUP — modern lookup with array returns

By mastering CHOOSEROWS, you can build powerful, dynamic data‑manipulation workflows in LibreOffice Calc.