How to use TAKE function in Excel?

The `TAKE` function in Excel is used to extract a specified number of rows or columns from either the start or the end of an array or range. It is available in Excel 365 and Excel 2021 onwards. Here’s a breakdown of how to use the `TAKE` function:

Syntax

TAKE(array, [rows], [columns])
  • array: The array or range from which you want to extract elements.
  • rows: (Optional) The number of rows to take. If positive, it takes rows from the start. If negative, it takes rows from the end.
  • columns: (Optional) The number of columns to take. If positive, it takes columns from the start. If negative, it takes columns from the end.

Examples

  • Extracting Rows from the Start:

Suppose you have data in range `A1:C10` and you want to extract the first 3 rows.

   =TAKE(A1:C10, 3)
  • Extracting Rows from the End:

If you want the last 2 rows from the same range:

   =TAKE(A1:C10, -2)
  • Extracting Columns from the Start:

To extract the first 2 columns from the range `A1:C10`:

   =TAKE(A1:C10, , 2)
  • Extracting Columns from the End:

To get the last column:

   =TAKE(A1:C10, , -1)
  • Combining Both Rows and Columns:

Get the first 3 rows and the first 2 columns:

   =TAKE(A1:C10, 3, 2)

Additional Notes

  • If you omit both `rows` and `columns`, the `TAKE` function will simply return the original array or range.
  • You can use negative values to easily access elements from the end of the dataset without calculating its size.
  • It is a dynamic array function, which means it can automatically spill the results into multiple cells.

This function is particularly useful for slicing arrays dynamically when working with dynamic data tables or performing exploratory data analysis.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project