DROP
Removes rows and optional columns from the start or end of an array.
DROP is the complement of TAKE and returns the remaining spilled subset.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=DROP(array, rows, [columns])
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
array | range (range) | Required | — |
rows | number | Required | — |
columns | number | Optional | — |
Remarks
- Positive counts drop from the start; negative counts drop from the end.
rowsis required;columnsis optional.- Dropping all rows or columns yields an empty spill.
- Invalid source references propagate errors.
Examples
Remove the first row from a rectangular array.
Formula =DROP({1,2;3,4;5,6},1)
Expected result {3, 4; 5, 6}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Remove the last row and the first column.
Formula =DROP({1,2;3,4;5,6},-1,1)
Expected result {2; 4}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Reduce a two-by-two array to a single remaining cell.
Formula =DROP({1,2;3,4},1,1)
Expected result 4
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The rows argument must give a numeric count.
Formula =DROP({1,2;3,4},"two")
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Drop header row
Formula =DROP(A1:A3,1)
| A | |
|---|---|
| 1 | "Month" |
| 2 | "Jan" |
| 3 | "Feb" |
Expected result {"Jan"; "Feb"}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Drop last column
Formula =DROP(A1:C1,0,-1)
| A | B | C | |
|---|---|---|---|
| 1 | 10 | 20 | 30 |
Expected result {10, 20}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
What does a negative drop count mean?
Negative counts drop from the end, so DROP(array,0,-1) removes the last column and keeps the leading columns.
What if DROP removes every row or column?
The result is an empty spill rather than an error when all rows or all columns are removed.