VBA Clear Entire Sheet

In VBA it’s fast and easy to clear an entire sheet (or worksheet).

Clear ActiveSheet

Clear Everything (Contents, Formats, Comments, etc.)

This will clear the Activesheet’s cells of all cell properties: contents, formats, comments, etc:

AutoMacro - VBA Code Generator

Clear Contents

Instead, you can clear ONLY the cell contents:


Clear Formats

or only the Cell Formats:


By typing: Cells.Clear into the VBA Editor you can see the list of Clear methods available to you:

vba clear entire sheet


Delete Worksheet UsedRange

You can also delete the entire worksheet’s UsedRange. This can also delete objects (shapes, charts, textboxes).



Clear Sheet (By Name)

To clear a specific sheet use the following code:




Clear Worksheet (From Variable)

To clear a sheet defined by a variable use the following code:

dim ws as worksheet

Set ws = Sheets("Sheet1")



VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)