TAKE returns a contiguous corner block of an array.
Given an m × n array A, a row count r and a column count c, the result is the
sub-array formed by:
the first r rows if r > 0, or the last |r| rows if r < 0;
the first c columns if c > 0, or the last |c| columns if c < 0.
The sign is the direction, and the magnitude is the count. That is the whole rule, and it is
what makes TAKE(A, -1) — the last row — one of the most useful short formulas in modern
Excel.
Counts larger than the array are the interesting case: TAKE(A, 100) over a five-row array
returns five rows. TAKE clamps rather than padding or erroring, which is what makes it safe
to use with a computed count. (EXPAND is the function that pads.)
Arguments
Microsoft documents TAKE(array, rows, [columns]).
Argument
Required
Meaning
array
yes
The array to take from
rows
yes (but omissible as an empty slot — see below)
Number of rows; negative takes from the end
columns
no
Number of columns; negative takes from the end
The subtlety readers most often miss is the empty slot in the second position.
TAKE(A, , 2) — with the row count written as nothing between two commas — means "all rows,
first two columns". The signature marks rows as required, and it is required in the sense that
you cannot write TAKE(A); but the omitted-slot spelling is legal and meaningful, and it is the
idiomatic way to slice columns only.
Formula
Excel result
=TAKE({1,2;3,4},,1)
{1;3}
=TAKE({1,2;3,4},,-1)
{2;4}
=DROP({1,2;3,4},,1)
{2;4}
=DROP({1,2;3,4},,-1)
{1;3}
That record exists because an implementation treated the empty slot as a missing required
argument and returned an error. It is the clearest available illustration of why
the value universe's Missing-versus-Empty distinction is
not academic.
Try it
Quirks
Result and edge cases
The return kind is an array — always, including when it has one element.
A count of zero produces an empty array. Microsoft documents that Excel returns #CALC!
to indicate an empty array when rows or columns is 0.
Counts exceeding the array clamp to the array's extent rather than padding.
Non-integer counts are expected to truncate; the Handbook has not verified the direction
or the resulting error for a non-numeric count.
Errors and blanks inside the array are carried through as values. A direct error as array is
the answer for the whole call, even with a count of zero: TAKE(#N/A,0) is #N/A
(FN-HSTACK-001).
Errors
Documented by Microsoft:
Error
Documented condition
#CALC!
An empty array, when rows or columns is 0
#NUM!
The array exceeds size limits
#SPILL! arises at publication when the result cannot be placed — a host outcome rather than a
TAKE outcome. Error values arriving in rows or columns propagate under the ordinary
coercion rules.
A direct error stops these array functions; the same error in an array or cell is an element
An error written directly as an argument of these functions is the answer for the whole call. It is not placed in the result: HSTACK(1,#VALUE!) is #VALUE!, not a row holding 1 and an error, and TAKE(#N/A,0) is #N/A. With MAP the LAMBDA does not run at all: MAP(NA(),LAMBDA(xx,IFERROR(xx,3))) is #N/A. The same error inside an array, or in a referenced cell, is an ordinary element: MAP({#N/A},LAMBDA(xx,3)) is 3, and HSTACK(Data!C1,{1;2}) with #N/A in Data!C1 is a 2 by 2 array with #N/A in its first column. TOCOL and TOROW show the difference with ignore 2: TOCOL(#N/A,2) is #N/A, while TOCOL({#N/A},2) drops the error, has nothing left, and is #CALC!. EXPAND is an exception on the cell side: EXPAND(Data!C1,2,2,"pad") is #N/A for the whole call. BYROW and BYCOL check the direct error first too: BYROW(#N/A,#VALUE!) is #N/A, while BYROW({#N/A},2), where 2 is not a LAMBDA, is #VALUE!.
Formula
Excel
Mathematical value
=HSTACK(1,#VALUE!) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
#VALUE!
—
=TAKE(#N/A,0) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
#N/A
—
=MAP(NA(),LAMBDA(xx,IFERROR(xx,3))) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
#N/A
—
=MAP({#N/A},LAMBDA(xx,3)) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
3 0x4008000000000000
—
=HSTACK(Data!C1,{1;2}) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
Data!C1: #N/A
{#N/A,1;#N/A,2}
—
=TOCOL(#N/A,2) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
#N/A
—
=TOCOL({#N/A},2) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
#CALC!
—
=EXPAND(Data!C1,2,2,"pad") Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
Data!C1: #N/A
#N/A
—
=BYROW(#N/A,#VALUE!) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Typed formula.
#N/A
—
=BYROW({#N/A},2) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Sign is direction; magnitude is count. Implementing negative counts as "count from the end,
exclusive" is off by one and produces plausible output.
Clamping is the documented behaviour for oversized counts — not an error, not padding.
The empty-slot form in the leading required position must normalize to "all rows". This is
a recorded defect class, verified against live Excel on 2026-04-10.
The zero-count case has a specific outcome (#CALC!) and needs an explicit branch; producing
a genuinely empty array and letting it leak downstream is not the same thing.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Excel 16.0.20527.20088
Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA
=TAKE(#N/A,0) returned #N/A. Inputs were supplied through formula literals. These are controls from this environment, not a same-input comparison with another build.
Observed formulas and results
=TAKE(#N/A,0) → #N/A(formula-literal)
Alternatives
Relationships
DROP is the exact complement: DROP(A, k) removes what TAKE(A, k) keeps, and the two
share the same sign convention and the same empty-slot behaviour. TAKE(A, 3) and
DROP(A, 3) partition A's rows.
CHOOSEROWS / CHOOSECOLS select arbitrary, non-contiguous indices; TAKE is the
contiguous-from-an-edge special case.
EXPAND is the growing counterpart: TAKE clamps down, EXPAND pads up.
INDEX with omitted arguments can extract whole rows or columns and predates all of
these; TAKE is the readable modern form.
TRIMRANGE answers a different question — remove the blank margin, whatever size it is —
where TAKE needs the count in advance.
Readers confuse TAKE(A, -1) (the last row) with TAKE(A, 1) (the first). The sign carries
a lot of meaning in a very small symbol.