ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VBA Question / Clearing out All Data (https://www.excelbanter.com/excel-worksheet-functions/15729-vba-question-clearing-out-all-data.html)

carl

VBA Question / Clearing out All Data
 
I would like to clear all my data that is in cell C4:J30000.

Is there a way to do this with a vba macro ?

Thank you in advance.

Gary Brown

Sub test()
Range("C4:J30000").Clear
End Sub


HTH,
Gary Brown

"carl" wrote:

I would like to clear all my data that is in cell C4:J30000.

Is there a way to do this with a vba macro ?

Thank you in advance.


carl

thank you. that worked great for me.

is there a way to have only the data cleared out yet leave the formating
unchanged ?

regards.

"carl" wrote:

I would like to clear all my data that is in cell C4:J30000.

Is there a way to do this with a vba macro ?

Thank you in advance.


Gary Brown

Change to...

Range("A1:A10").ClearContents

HTH,
Gary Brown


"carl" wrote:

thank you. that worked great for me.

is there a way to have only the data cleared out yet leave the formating
unchanged ?

regards.

"carl" wrote:

I would like to clear all my data that is in cell C4:J30000.

Is there a way to do this with a vba macro ?

Thank you in advance.



All times are GMT +1. The time now is 06:57 PM.

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