TAKE

returns rows or columns from the start or end of an array · from excel · excel: verified match · no sheets equivalent

signature

TAKE(array, rows, [columns])

returns: array

argumentrequired
array required
rows required
columns optional

examples

formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.

ABC
1 102alpha
2 204beta
3 306gamma
4 408delta
5 5010epsilon
fx =TAKE(A1:C5, 2) 10

errors

error values observed from the engine — each with a call that produces it.

errorproduced by
#CALC! =TAKE(A1:A3,0)

related

  • ARRAY_CONSTRAIN truncates a range to at most the given rows and columns
  • ARRAYFORMULA evaluates an expression across a range (this engine already spills, so it is a pass-through for sheets compatibility)
  • ARRAYTOTEXT converts array to text representation
  • BYCOL applies lambda to each column of array
  • BYROW applies lambda to each row of array
  • CHOOSECOLS returns the specified columns from an array