Example 1
The first three rows
F2 =TAKE(A2:D6,3)
Result: Ops, 120, 135, 128; Sales, 210, 190, 225; IT, 95, 110, 105
A positive number takes rows from the top.
F2 =TAKE(A2:D6,3) returns Ops, 120, 135, 128; Sales, 210, 190, 225; IT, 95, 110, 105
Returns a set number of rows or columns from the start or end of a range or array. Negative numbers take from the end.
Syntax
=TAKE(, , )
Excel for Microsoft 365, Excel 2024 and later, and Excel for the web. Not available in Excel 2021 or earlier.
Try it
Edit the formula in F2 or change the inputs. The sheet recalculates as you type.
F2 =TAKE(A2:D6,3) returns Ops, 120, 135, 128; Sales, 210, 190, 225; IT, 95, 110, 105
TAKE keeps a block from the edge of an array: the first few rows, the last few, the left columns, or the right columns. It is the formula version of "show me the top 5".
=TAKE(A2:D6,3) returns the first three rows, and =TAKE(A2:D6,-2) the last two.=TAKE(A2:D6,,2) keeps all rows but only the first two columns. The empty slot for rows is deliberate.Give both and you take a corner. =TAKE(A2:D6,2,-2) returns the first two rows of the last two columns.
If you ask for more rows or columns than the array has, TAKE returns everything it has and doesn't raise an error. A count of 0 is an error and returns #CALC!, because the result would be empty.
TAKE becomes useful when you combine it with SORT. Sort the table first, then take from the top:
=TAKE(SORT(A2:D6,4,-1),3)
This returns the three departments with the highest Q3. Use -3 with an ascending sort to get the same result the other way round. Because SORT and TAKE are formulas, the top three update when the data does.
=TAKE(A2:B100,-5) returns the last five rows of a list. It only works as the "latest five" when the list has no blank rows at the bottom, so keep the range tight, or wrap it in a FILTER that drops blanks, as in =TAKE(FILTER(A2:B100,A2:A100<>""),-5).
TAKE keeps a run from an edge. DROP removes a run from an edge, so TAKE(array,-3) and DROP(array,ROWS(array)-3) agree. CHOOSEROWS and CHOOSECOLS pick rows or columns that aren't together, in any order. Use TAKE for the simple edge case: it is shorter and reads better.
The result spills into the cells below and to the right. If the area isn't empty, you get #SPILL!. You can read the whole result in another formula with the spill operator, such as =SUM(F2#). See FILTER for more.
TAKE needs Microsoft 365, Excel 2024 or later, or Excel for the web. In earlier versions it returns #NAME?, and INDEX with a range such as A2:INDEX(A:A,5) does a similar job.
SORT(...).TAKE(A2:D6,,2).Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
F2 =TAKE(A2:D6,3)
Result: Ops, 120, 135, 128; Sales, 210, 190, 225; IT, 95, 110, 105
A positive number takes rows from the top.
F2 =TAKE(A2:D6,3) returns Ops, 120, 135, 128; Sales, 210, 190, 225; IT, 95, 110, 105
Example 2
F2 =TAKE(A2:D6,-2)
Result: HR, 60, 58, 64; Legal, 75, 80, 70
A negative number takes rows from the bottom.
F2 =TAKE(A2:D6,-2) returns HR, 60, 58, 64; Legal, 75, 80, 70
Example 3
F2 =TAKE(A2:D6,,2)
Result: Ops, 120; Sales, 210; IT, 95; HR, 60; Legal, 75
The empty rows argument keeps all five rows. The 2 in the third position keeps the two leftmost columns.
F2 =TAKE(A2:D6,,2) returns Ops, 120; Sales, 210; IT, 95; HR, 60; Legal, 75
Example 4
F2 =TAKE(A2:D6,2,-2)
Result: 135, 128; 190, 225
Rows 1 and 2 of the table, and its last two columns, Q2 and Q3.
F2 =TAKE(A2:D6,2,-2) returns 135, 128; 190, 225
Example 5
F2 =TAKE(SORT(A2:D6,4,-1),3)
Result: Sales, 210, 190, 225; Ops, 120, 135, 128; IT, 95, 110, 105
SORT puts the departments in descending order of Q3, the fourth column. TAKE keeps the top three.
F2 =TAKE(SORT(A2:D6,4,-1),3) returns Sales, 210, 190, 225; Ops, 120, 135, 128; IT, 95, 110, 105
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In F2, show the three reps with the highest revenue, all four columns, highest first.
Answer in F2.
#CALC!, because the result would be empty. If the count comes from a cell, guard it with MAX(1,B1).TAKE(A2:D6,2) keeps two rows, but TAKE(A2:D6,,2) keeps two columns. The missing rows argument still needs its comma.Sort first, then take: `=TAKE(SORT(A2:B20,2,-1),5)` returns the five rows with the highest value in column B.
Use a negative number: `=TAKE(A2:B20,-1)` is the last row and `=TAKE(A2:B20,-5)` the last five. Make sure there are no empty rows at the bottom of the range.
Leave the row count empty and give a column count: `=TAKE(A2:D6,,2)` returns the first two columns. A negative column count takes columns from the right.
TAKE returns every row without an error. If you need to know whether the array is long enough, compare the row count with `ROWS(array)`.
No. It is available in Microsoft 365, Excel 2024 and later, and Excel for the web. In earlier versions the formula returns `#NAME?`.
TAKE is taught in Data analysis with formulas, lesson 13: Combining dynamic arrays. Each lesson is a short, graded exercise like the one above.