Functions Utility

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 RangeThe range of data used as input.
RowsThe specific rows to return.
A comma separated list is used (e.g., “3,2”).
ColumnsThe 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):

LettersNumbersDates
AAA1111/1/2026
BBB2221/2/2026
CCC3331/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:

BBB1/2/2026
AAA1/1/2026
> Example 2: Creating an array from an existing array with headers


Data Range (A1:C4):

LettersNumbersDates
AAA1111/1/2026
BBB2221/2/2026
CCC3331/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:

LettersDates
BBB1/2/2026
AAA1/1/2026