SubArray
The SubArray() function is used to create a new array from a selected portion of an existing array.
Syntax:
Qx.SubArray(Data Range, [Rows], [Columns])- In Excel with Quintessence addin versions prior to 25.1, use:
SubArray() - In the Quintessence Editor (Studio) using Quintessence language, use:
SubArray() - In the Quintessence Editor (Studio) using Python language, use:
Qx.SubArray()
ⓘ See parameter descriptions
| Data Range | The range of data used as input. |
| Rows | The specific rows to return. A comma separated list is used (e.g., “3,2”). |
| Columns | The specific columns to return. If the Data Range contains headers, header notation may be used to select columns (e.g., “[Letters]”). When using header notation, the Rows parameter should correspond to data rows only (i.e., offset by one if the range includes a header row). |
Remarks:
- The default parameters are:
- Rows: Return all rows
- Columns: Return all columns
Examples:
The examples provided below are based on fictitious data for illustrative purposes only.
> Example 1: Creating an array from an existing array
Data Range (A1:C4):
| Letters | Numbers | Dates |
| AAA | 111 | 1/1/2026 |
| BBB | 222 | 1/2/2026 |
| CCC | 333 | 1/3/2026 |
The sub-array should contain:
- Row 3 at the top
- Row 2 below Row 3
- Columns 1 and 3
- No headers
Function call:
=Qx.SubArray(A1:C4,"3,2", "1,3")Result:
| BBB | 1/2/2026 |
| AAA | 1/1/2026 |
> Example 2: Creating an array from an existing array with headers
Data Range (A1:C4):
| Letters | Numbers | Dates |
| AAA | 111 | 1/1/2026 |
| BBB | 222 | 1/2/2026 |
| CCC | 333 | 1/3/2026 |
The sub-array should contain:
- Row 3 at the top
- Row 2 below Row 3
- Columns 1 and 3
- Headers included
Function call:
=Qx.SubArray(A1:C4, "2, 1", "[Letters], [Dates]")Result:
| Letters | Dates |
| BBB | 1/2/2026 |
| AAA | 1/1/2026 |
