Cellwise Start free

Dynamic arrays function

Excel TAKE function

TAKE returns a number of rows or columns from the start or end of a range. A positive number takes from the top or left, a negative one from the bottom or right. Combined with SORT it gives a top-N list; on its own it grabs the latest entries of a log.

=TAKE(array, rows, [columns])

Arguments

array
The range or array to take from.
rows
How many rows: positive from the top, negative from the bottom. Leave it empty to keep all rows.
columns
Optional. How many columns: positive from the left, negative from the right.

TAKE examples

Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.

ABC
1WeekRepSales ($)
21Kim3400
32Raj4100
43Lou2900
54Kim5200
65Ana3800
76Raj4600
87Lou3100
98Ana4900

Download this sheet as an Excel practice file (.xlsx)

  1. =TAKE(SORT(A2:C9,3,-1),3)

    Result: spills 3 rows × 3 columns

    4Kim5200
    8Ana4900
    6Raj4600

    Sort by sales, largest first, then take three rows: the top three weeks, led by week 4 at 5,200.

  2. =TAKE(A2:C9,-2)

    Result: spills 2 rows × 3 columns

    7Lou3100
    8Ana4900

    A negative number takes from the bottom: the last two weeks, 7 and 8.

  3. =SUM(TAKE(C2:C9,-4))

    Result: 16400

    A rolling total of the last four weeks: 16,400. Point it at a Table column and it moves along as you add weeks.

  4. =TAKE(A2:C9,1,-1)

    Result: 3400

    One row and one column from the right: the first week’s sales, 3,400.

How to use TAKE

  1. Click a cell with room to spill.
  2. Type =TAKE( and select the range.
  3. Type the number of rows, negative to count from the bottom.
  4. Optionally add a number of columns, then press Enter.

Common TAKE mistakes

Asking for 0 rows

TAKE(range,0) leaves nothing and returns #CALC!. Leave the rows argument empty to keep every row: TAKE(range,,2).

Taking a top 3 without sorting

TAKE keeps the original order. Sort first with SORT or SORTBY.

Older Excel

TAKE needs Excel for Microsoft 365, Excel 2024 or Excel for the web. In older versions use INDEX with LARGE, or OFFSET.

TAKE FAQ

How do I get the last 5 rows in Excel?

Use =TAKE(range,-5). With a table or a whole-column range, new rows are included automatically.

How do I show the top 3 values with names?

Use =TAKE(SORT(range,column,-1),3), where column is the position of the value column inside the range.

What happens if I ask for more rows than there are?

TAKE returns all the rows; it does not pad or return an error.

Guides that use TAKE

Related functions

Updated