Release notes
Semi-Annual Enterprise Channel
Semi-Annual Enterprise Channel (Preview)
Returns a specified number of contiguous rows or columns from the start or end of an array.
Syntax
=TAKE(array, rows,[columns])
The TAKE function syntax has the following arguments:
- array The array from which to take rows or columns.
- rows The number of rows to take. A negative value takes from the end of the array.
- columns The number of columns to take. A negative value takes from the end of the array.
Errors
- Excel returns a #CALC! error to indicate an empty array when either rows or columns is 0.
- Excel returns a #NUM when array is too large.
Examples
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data.
Example 1
Returns the first two rows from the array in range A2:C4.
| Data | ||
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| Formulas | ||
| =TAKE(A2:C4,2) |
Example 2
Returns the first two columns from the array in range A2:C4.
| Data | ||
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| Formulas | ||
| =TAKE(A2:C4,,2) |
Example 3
Returns the last two rows from the array in range A2:C4.
| Data | ||
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| Formulas | ||
| =TAKE(A2:C4,-2) |
Example 4
Returns the first two rows and columns from the array in range A2:C4.
| Data | ||
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| Formulas | ||
| =TAKE(A2:C4,2,2) |