1. Home
  2. Functions
  3. Array
  4. CHOOSEROWS

CHOOSEROWS function

Returns the given rows of an array (negative numbers count from the end).

Syntax

=CHOOSEROWS(array, row_num1, [row_num2], ...)

Arguments

ArgumentRequiredDescription
arrayRequiredThe range or array
row_num1RequiredA row number
row_num2OptionalMore row numbers

How to use CHOOSEROWS

When CHOOSEROWS returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

CHOOSEROWS takes 2 required arguments and 1 optional argument, and accepts more values in the same pattern. Type =CHOOSEROWS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=CHOOSEROWS({1,2;3,4;5,6}, 3, 1)Result 2 by 2 array
Spilled result
AB
156
212
=CHOOSEROWS({1;2;3}, -1)Result 3
=CHOOSEROWS({1;2}, 3)Result #VALUE!

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.