CHOOSEROWS Function in Excel

The CHOOSEROWS function extracts specific rows from arrays by position. Learn syntax, examples, and solutions for dynamic data selection in Excel 365.

ExcelExcel
Google SheetsGoogle Sheets
array
intermediate
Syntax Preview
ExcelExcel
=CHOOSEROWS(array, row_num1, [row_num2], ...)
What is the CHOOSEROWS Function?

Practical Examples

Basic Row Extraction

Extract specific rows from a sales data table

Result: Array containing rows 1, 5, and 8 with all columns

First and Last Row Comparison

Compare opening and closing values using positive and negative indexing

Result: Two-row array showing first and last data records

Creating Sample Data Subsets

Extract evenly distributed sample rows for data preview

Result: Five-row sample showing distribution across full dataset

Combining with Other Array Functions

Nest CHOOSEROWS with SORT to extract top and bottom performers

Result: Top 2 and bottom 2 performers from sorted sales data

Dynamic Header Preservation with Variable Rows

Always include headers while extracting data rows based on criteria

Result: Header row plus 5 high-priority project rows

Common Errors and Solutions

#VALUE!

CHOOSEROWS returns #VALUE! error

Cause:

Row number specified is zero, or row_num arguments are not numeric values. The function requires integer row numbers (positive or negative) and cannot accept zero or text values as row positions.

Solution:

1. Verify all row_num arguments are numeric (not text) 2. Ensure no row number is zero (use 1 for first row) 3. Check for hidden cell references that might contain text 4. Use INT() or ROUND() to convert decimal numbers to integers 5. Validate that formula references point to cells with numbers 6. Test with simple hardcoded values first to isolate the issue

Prevention:

Always use whole numbers (1, 2, 3, or -1, -2, -3) for row positions. If row numbers are calculated, wrap the calculation in INT() to ensure integer values: =CHOOSEROWS(A:D, INT(B5), INT(B6)). Use data validation on input cells to restrict entries to whole numbers only.

Frequency: 35%

Example:

#NUM!

Row number exceeds array dimensions

Cause:

The specified row number is larger than the number of rows in the source array, or the negative index exceeds the array size from the bottom. For example, requesting row 50 from a 30-row array, or using -40 when only 30 rows exist.

Solution:

1. Verify the source array row count using ROWS(array) 2. For positive numbers: ensure row_num ≤ ROWS(array) 3. For negative numbers: ensure ABS(row_num) ≤ ROWS(array) 4. Use MIN/MAX to cap row numbers within valid range 5. Implement error handling with IFERROR for dynamic arrays 6. Add validation checks before CHOOSEROWS execution

Prevention:

Validate row numbers before using them: =CHOOSEROWS(A:D, MIN(row_num, ROWS(A:A)), ...). Or use IFERROR to handle invalid requests gracefully: =IFERROR(CHOOSEROWS(...), "Row not found"). For dynamic data, always validate bounds before extraction.

Frequency: 40%

Example:

#CALC!

Spill range is blocked or conflicts with existing data

Cause:

CHOOSEROWS attempts to spill results into adjacent cells, but those cells contain data, formulas, or merged cells. Dynamic arrays require contiguous empty cells for output, and any obstruction triggers this error.

Solution:

1. Clear all cells where the array needs to spill (to the right and down) 2. Unmerge any merged cells in the spill range 3. Delete or move conflicting data/formulas 4. Use the spill range indicator (blue border) to identify required space 5. Consider placing the formula in a different location with more empty space 6. Click the error icon to see which cells are blocking the spill

Prevention:

Before entering CHOOSEROWS formulas, ensure adequate empty space. Plan for the maximum spill size: if extracting 5 rows from a 10-column table, you need 5 rows × 10 columns of empty cells. Create dedicated output areas in your worksheets for dynamic array formulas. Use worksheet design that reserves sections for array outputs.

Frequency: 25%

Example:

Advanced Tips and Best Practices

Use SEQUENCE for Pattern-Based Selection

Generate row numbers dynamically with SEQUENCE to extract rows at regular intervals. For example, SEQUENCE(10, 1, 1, 3) creates row numbers 1, 4, 7, 10, 13, 16, 19, 22, 25, 28 (every 3rd row for 10 results), enabling systematic sampling without manual number entry.

Row Numbers Are Relative to Input Array

Remember that row numbers in CHOOSEROWS are relative to the array input, not absolute worksheet rows. If your array starts at A5, row 1 refers to A5, not A1. This is crucial when working with ranges that don't start at row 1.

Excel 365 and Google Sheets Availability

CHOOSEROWS requires Excel 365 or Excel 2021+ with dynamic arrays enabled. Google Sheets also supports this function. Earlier Excel versions (2019, 2016) cannot use CHOOSEROWS; use INDEX with array formulas as an alternative for compatibility.

Wrap in IFERROR for Production Use

Always wrap CHOOSEROWS with IFERROR in production spreadsheets to handle dynamic data that might change size or structure. This prevents #NUM! and #VALUE! errors from disrupting dashboards or reports when source data varies unexpectedly.

Use Named Ranges for Clarity

When working with complex CHOOSEROWS formulas, use named ranges for your source data. This makes formulas more readable and easier to maintain. For example, =CHOOSEROWS(SalesData, 1, 5) is clearer than =CHOOSEROWS(A2:E100, 1, 5).

Combine with CHOOSECOLS for Precise Extraction

Use CHOOSEROWS and CHOOSECOLS together to extract specific rows AND columns from a data range, creating precise matrix selections. This is perfect for extracting exactly the data you need without any excess.

CHOOSEROWS vs Alternative Functions
Related Array Functions

Need Help with CHOOSEROWS Function in Excel?

Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.

Example Excel formula:

Related Formulas

CHOOSECOLS Function in Excel

Master CHOOSECOLS to select columns from arrays in Excel 365. Learn syntax, examples, and error solutions for dynamic data extraction.

intermediate
array
ExcelExcel
Validated
DROP Function in Excel

The DROP function excludes rows or columns from an array, returning the remaining data. Learn how to filter arrays dynamically in Excel 365.

intermediate
array
ExcelExcel
Validated
TAKE Function in Excel

The TAKE function extracts a specified number of rows or columns from an array. Master TAKE with practical examples for data extraction and analysis.

intermediate
array
ExcelExcel
Validated
EXPAND Function in Excel

Master the EXPAND function to dynamically resize arrays by adding rows and columns. Learn syntax, examples, and solutions for array manipulation in Excel 365.

advanced
array
ExcelExcel
Validated