ARRAY_CONSTRAIN

Constrains an array result to a specified size.

Sample usage

ARRAY_CONSTRAIN(A1:C10, 2, 3)

ARRAY_CONSTRAIN(SORT(A1:F100, 1, TRUE), 10, 6)

Syntax

ARRAY_CONSTRAIN(input_range, num_rows, num_cols)

  • input_range – The range to be constrained.
  • num_rows – The number of rows that the result should contain.
  • num_cols – The number of columns that the result should contain

Notes

  • Generally used in combination with other functions that return an array result when a fewer number of rows or columns is desired.

See also

ARRAYFORMULA: Enables the display of values returned from an array formula into multiple rows and/or columns and the use of non-array functions with arrays.

true
Visit the Learning Center

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

Search
Clear search
Close search
Main menu
5579672456659339563
true
Search Help Centre
true
true
true
true
true
35
false
false