How can I clear all value cells in an entire 2003 Excel workbook by one go?
I could do one sheet by going to special functions, however, if a file is composed of many sheets, it would take a lot more effort.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Based on the comments on a previous answer, I'm assuming you don't want to wipe out formulas? If this is the case, selecting Special (CTRL G > Special > Constants) works, but only on one sheet at a time.
However if you record this process, you could then put it inside a VBA loop.
Sub DeleteConstants() Dim wstWorksheet As Worksheet For Each wstWorksheet In ActiveWorkbook.Worksheets Selection.SpecialCells(xlCellTypeConstants, 23).ClearContents Next wstWorksheet End Sub
That should be it.
Using Shift you can do this even just for specific worksheet. Also you can apply formatting on all selected sheets at once.