AI Assistant
Help Center AI Assistant is now available
Got questions about Lark? Use our AI chat to find the answers.
00:00
Click and hold to drag
Got It
Try Now
ARRAY_CONSTRAIN function for Sheets

ARRAY_CONSTRAIN function for Sheets

1 min read
I. Intro
The ARRAY_CONSTRAIN function can be used to return a data set with a specified number of rows and columns.
II. About the function
  • Formula: =ARRAY_CONSTRAIN(input_range, num_rows, num_cols)
  • Arguments:
  • input_range: The data range to constrain.
  • num_rows: Specifies the number of rows the data set should contain.
  • num_cols: Specifies the number of columns the data set should contain.
  • Example: =ARRAY_CONSTRAIN(A1:E6, 3, 3) extracts the data from the first 3 rows and first 3 columns of the A1:E6 range.
250px|700px|reset
III. Steps
Use the function
  1. Open the spreadsheet, select a cell, and enter the formula =ARRAY_CONSTRAIN(input_range, num_rows, num_cols).
  1. Press Enter to get the result.
250px|700px|reset
Delete the function
Select the cell with the function and press Delete.
IV. Use cases
Quickly extract information
With this function, you can quickly extract the information you need from a large data set.
In the following example, the A2:D7 range consists of sales data from January to June. You can quickly extract the sales data for the first quarter (January to March) through the formula =ARRAY_CONSTRAIN(A2:D7,3,4). The 3 in the formula represents the first 3 rows, and the 4 represents the first 4 columns, which contains all the data for the first quarter.
250px|700px|reset
Written by: Lark Help Center
Updated on 2024-08-28
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
rangeDom