Calc DROP function

The DROP function is used to remove elements from a list or array, starting from the end.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.


Description

The DROP function is used to remove elements from a list or array, starting from the end. This can be useful when you want to simplify data by removing unnecessary elements.


Syntax

DROP(array, [count])


The DROP function syntax has the following arguments:

  • array Required. The list or array from which you want to remove elements.
  • count Optional. The number of elements to remove from the end of the array. If omitted, it defaults to 1.

Example

FormulaDescriptionResult
=DROP({1, 2, 3, 4, 5})Removes the last element (5) from the array.{1, 2, 3, 4}
=DROP({"apple", "banana", "cherry"}, 2)Removes the last two elements ("banana" and "cherry") from the array.{"apple"}

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.