ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clearcontents (https://www.excelbanter.com/excel-programming/309434-clearcontents.html)

Caroline vincent

Clearcontents
 
Does anyone know how to clear the content of a range
without deleting the formulae?
Range(XXX).clear or Range(XXX).clearcontents delete the
formulae as well.
Thanks


Harald Staff

Clearcontents
 

Range("A1:D500").SpecialCells(xlCellTypeConstants, 23).ClearContents

Explore more on possibilities using the Edit Goto Special menu while
recording macros.

HTH. best wishes Harald

"Caroline Vincent" skrev i melding
...
Does anyone know how to clear the content of a range
without deleting the formulae?
Range(XXX).clear or Range(XXX).clearcontents delete the
formulae as well.
Thanks




Caroline vincent

Clearcontents
 
Good tip. it works. thanks a lot
-----Original Message-----

Range("A1:D500").SpecialCells(xlCellTypeConstants ,

23).ClearContents

Explore more on possibilities using the Edit Goto

Special menu while
recording macros.

HTH. best wishes Harald

"Caroline Vincent"

skrev i melding
...
Does anyone know how to clear the content of a range
without deleting the formulae?
Range(XXX).clear or Range(XXX).clearcontents delete the
formulae as well.
Thanks



.



All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com