Hapus sebagian dari array
=DROP(array, [rows], [col])
| Parameter | Deskripsi |
|---|---|
array |
The source array or range. |
rows |
[optional] Number of rows to drop. |
col |
[optional] Number of columns to drop. |
To use DROP, provide an array or range, and numbers for rows and/or columns:
=DROP(array,3) // drop first 3 rows
=DROP(array,,3) // drop first 3 columns
=DROP(array,3,2) // drop first 3 rows and 2 columns
To remove rows or columns from the start of a range or array, provide positive numbers for rows and columns. In the worksheet below, the formula in F3
=DROP(B3:D11,6) // drop first 6 rows
The second formula in F8 is:
=DROP(B3:D11,5,1) // drop first 5 rows and column 1
To remove values from the end of an array, provide negative numbers for rows and columns. In the worksheet below, the formula in cell F3 is:
=DROP(B3:D11,-6)
The formula in F8 is:
=DROP(B3:D11,-5,-1)
The DROP and TAKE functions both return a subset of an array, but they work in opposite ways. While the DROP function removes specific rows or columns
=DROP(array,1) // remove first row
=TAKE(array,1) // get first row