To prevent the headers from being cleared, you will need this;
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Cells.Range("A2:Z" & LR).ClearContents
Whereas, Z is the last column that I guessed where your data extends to. You can change the value of Z to whatever suits the last column of your data.
The line;
Application.ScreenUpdating = False
will prevent the screen from flickering when as the code runs.
After the code completes, the last line;
Application.ScreenUpdating = True
allows the screen to refresh.
Bookmarks