Macro to delete


Posted by Bill on March 30, 2001 6:45 PM

How would you write a macro to delete all the text and numbers but not the formatting in all the sheets in a workbook?

Posted by T.Rex on March 30, 2001 7:25 PM

Posted by T.Rex on March 30, 2001 7:25 PM

Posted by T.Rex on March 30, 2001 7:27 PM


Record the following with the macro recorder.

Select all sheets
Select all cells
Edit/Clear/Contents




Posted by mseyf on March 31, 2001 9:06 PM

Bill-
you could try something like:

Sub ClearAllCells()

Sheets.Select
Cells.Select
Selection.ClearContents
Range("a1").Select
ActiveSheet.Select

End Sub

HTH

Mark