Skip to main content
Version: Streamsheets 3.0

CLEARCELLS

Removes value, formula or format of cells in specified range.

Syntax

=CLEARCELLS(Range, [Type])

Arguments

NameTypeDescription
RangeRangeRange of cells to clear.
Type (optional)ClearCellTypeNumber to specify what to clear. Note: a combination of type numbers is supported too.

Options:
1: Clear cell value
2: Clear cell formula
3: Clear cell formula and value

Default value: 1

Return

TypeDescription
Boolean or ErrorTRUE on success or an error code otherwise.

Examples

FormulaResultComment
=CLEARCELLS(A1:B2)
TRUEClears the value of each cell in range A1:B1.
=CLEARCELLS(A1:B2, 1)
TRUESame as before.
=CLEARCELLS(A1:B2, 3)
TRUEClears value and formula of each cell in range A1:B1.
=CLEARCELLS(A1:B2, 7)
TRUEDeletes all cells in range A1:B1.