vba - Clear contents and formatting of an Excel cell with a single command -
if want clear contents of cell or range in microsoft excel, can use .clearcontents
. if want clear formatting, can use .clearformats
.
sheets("test").range("a1:c3").clearcontents sheets("test").range("a1:c3").clearformats
if want both, can use .delete
, other cells in spreadsheet shift replace deleted cells.
sheets("test").range("a1:c3").delete
how can remove contents and formatting of cell or range in vba single command, without affecting rest of worksheet?
Comments
Post a Comment