Applies ToExcel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

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.

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)

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)

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)

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)

See Also

TOCOL function

TOROW function

DROP function EXPAND Function

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.