ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to erase the full content of a sheet (https://www.excelbanter.com/excel-programming/354003-how-erase-full-content-sheet.html)

Maileen[_3_]

how to erase the full content of a sheet
 
Hi,

I would like to know how can i erase the content of all cells from a sheet.

i tried somethine like sheet(1).range("A1:IV65536").value=""
but it use 100 % CPU for 20 seconds and more than 180 Mb of memory...

i'm sure that something else can be done easily and without such resource
usage.

Maileen

Chris Marlow

how to erase the full content of a sheet
 
Maileen,

Sheet(1).Clear - to clear all
Sheet(1).ClearContents - to preserve formatting.

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"Maileen" wrote:

Hi,

I would like to know how can i erase the content of all cells from a sheet.

i tried somethine like sheet(1).range("A1:IV65536").value=""
but it use 100 % CPU for 20 seconds and more than 180 Mb of memory...

i'm sure that something else can be done easily and without such resource
usage.

Maileen


Norman Jones

how to erase the full content of a sheet
 
Hi Maileen,

Try:

Sheets(1).Cells.Clear


---
Regards,
Norman



"Maileen" wrote in message
...
Hi,

I would like to know how can i erase the content of all cells from a
sheet.

i tried somethine like sheet(1).range("A1:IV65536").value=""
but it use 100 % CPU for 20 seconds and more than 180 Mb of memory...

i'm sure that something else can be done easily and without such resource
usage.

Maileen





All times are GMT +1. The time now is 07:00 AM.

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