Select the range first--be sure not to include the cells that contain labels
that you want to keep (headers/instructions).
Then edit|Goto|Special|Constants
and click ok.
The original selection will be reduced to just the cells that contain constants.
Then hit the delete key on the keyboard.
In code, you can loop through the worksheets like:
Option Explicit
Sub testme()
Dim wks As Worksheet
On Error Resume Next
For Each wks In ActiveWorkbook.Worksheets
wks.Cells.SpecialCells(xlCellTypeConstants).ClearContents
Next wks
On Error GoTo 0
End Sub
But this will clear the contents of all cells with values--including headers.
I'd be careful.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.