Syntax
=DROP(array, rows, [columns])Arguments
| Argument | Required | Description |
|---|---|---|
array | Required | The range or array |
rows | Required | Rows to drop (negative from the end) |
columns | Optional | Columns to drop (negative from the end) |
How to use DROP
When DROP returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.
DROP takes 2 required arguments and 1 optional argument. Type =DROP( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=DROP({1,2;3,4;5,6}, 1)Result Spilled result
| A | B | |
|---|---|---|
| 1 | 3 | 4 |
| 2 | 5 | 6 |
=DROP({1,2;3,4;5,6}, -2, 1)Result =DROP({1;2}, 2)Result Related array functions
- BYCOLApplies a LAMBDA to each column of an array and returns one result per column.
- BYROWApplies a LAMBDA to each row of an array and returns one result per row.
- CHOOSECOLSReturns the given columns of an array (negative numbers count from the end).
- CHOOSEROWSReturns the given rows of an array (negative numbers count from the end).
- EXPANDExpands an array to the given number of rows and columns, filling new cells with a pad value.
- FILTERReturns the rows (or columns) of a range or array that meet a condition.
- FLATTENPuts the values of one or more ranges into a single column, reading row by row.
- GROUPBYGroups rows by the values of one or more columns and aggregates the values of each group.
- HSTACKPlaces arrays side by side; shorter columns are padded with #N/A.