Lookup & reference function

TAKE function

Returns a given number of rows and/or columns from the start or end of a range or array.

Available in Microsoft 365, Excel 2024, Excel for the web, Excel for Mac 2024+

Excel 2024 and laterNot in Google Sheets

Syntax

TAKE(array, rows, [columns])
ArgumentWhat it means
arrayRequiredThe range or array to take from.
rowsRequiredHow many rows to keep. Positive takes from the top, negative from the bottom. Leave empty to keep all rows.
columnsOptionalHow many columns to keep. Positive takes from the left, negative from the right.

Returns: The first or last rows/columns of array, which spill.

How TAKE works

TAKE keeps the first or last few rows or columns of a range. Ask for 3 and you get the top three; ask for -3 and you get the bottom three. It is the cleanest way to build top-N reports when wrapped around SORT, and the easiest way to work with "the last few months" when wrapped inside SUM or AVERAGE.

If you ask for more rows than exist, TAKE simply returns everything rather than an error. Because it does not need to know the size of the data, a rolling total such as SUM(TAKE(B2:B100, -3)) keeps working as new months are added - as long as the range does not include blank rows at the end; combine it with TRIMRANGE or a formatted table for that. Its opposite is DROP.

Examples

1First three rows

D2fx=TAKE(A2:B7, 3)
ABCDE
1MonthSales
2Jan8200Jan8200
3Feb9150Feb9150
4Mar10400Mar10400
5Apr9800
6May11250
7Jun12030

The first quarter: January to March.

2Last two rows

D2fx=TAKE(A2:B7, -2)
ABCDE
1MonthSales
2Jan8200May11250
3Feb9150Jun12030
4Mar10400
5Apr9800
6May11250
7Jun12030

Negative rows count from the bottom: May and June.

3Rolling 3-month total

D2fx=SUM(TAKE(B2:B7, -3))
ABCD
1MonthSales
2Jan820033080
3Feb9150
4Mar10400
5Apr9800
6May11250
7Jun12030

Result: 33080

TAKE returns April to June and SUM adds them: 9800 + 11250 + 12030.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#CALC!rows or columns is 0, so the result would be empty.Use a non-zero number or leave the argument out.
#SPILL!The output area is blocked.Clear the cells where the result spills.

Tips

  • =TAKE(SORT(A2:B7, 2, -1), 3) lists the three best months.
  • Use TAKE on a formatted table column (Sales[Amount]) so new rows are automatically included.

Google Sheets

Use ARRAY_CONSTRAIN(range, rows, columns) for the first rows, or CHOOSEROWS with negative numbers for the last rows.

TAKE in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechVZÍT
DanishTAG
DutchNEMEN
FinnishOTA
FrenchPRENDRE
GermanÜBERNEHMEN
HungarianÁTHELYEZ
ItalianINCLUDI
Norwegian (Bokmål)TA
PolishWYCINEK
RussianВЗЯТЬ
SpanishTOMAR
SwedishTA
TurkishAL

Recipes that use TAKE