clearcells
Clear cell contents while preserving the cells themselves.
Syntax
Section titled “Syntax”clearcells(crDst)clearcells(crDst, role)Description
Section titled “Description”Clears the data in crDst but keeps the rows and columns intact. The optional role string selects what to clear (default clears values):
'ValueRole'— cell values (default)'FormulaRole'— formulas only'FormatRole'— formatting / styles'CommentRole'— comments- …and other CellDataRole names
Examples
Section titled “Examples”clearcells(A1:C10) % clear valuesclearcells(A1:C10, 'FormatRole') % clear formatting onlySee also
Section titled “See also”deletecells— Delete cells, shifting remaining cells.copycells— Copy a cell range, optionally to a destination range.