Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Deleting Everything Except Formulas.
by Allen Wyatt
(last updated August 8, 2015)
At the beginning of each year Richard makes a copy of the previous year's Excel workbook. To get ready for the new year's data, he then needs to delete everything in the copy except for formulas. Richard wonders if there is a quick way to do this.
Actually, there is a very quick way to manually delete all the non-formula information in a worksheet. Follow these steps:
Figure 1. The Go To Special dialog box.
If you have a lot of worksheets in a workbook and you want to delete all the constants from each of the worksheets, you might want to use a macro that automates the above steps for the entire workbook.
Sub DelAllConstants() Dim wks As Worksheet Dim rng As Range For Each wks In ThisWorkbook.Worksheets On Error Resume Next Set rng = wks.Cells.SpecialCells(xlCellTypeConstants, 23) On Error GoTo 0 If Not rng Is Nothing Then rng.ClearContents End If Set rng = Nothing Next Set wks = Nothing End Sub
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11168) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Deleting Everything Except Formulas.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
If you want to get rid of the contents of a range of cells, a quick way to do it is with the Fill handle. Yes, you can ...Discover More
When you select cells in a worksheet, there is a good chance that if you glance at the Task Bar, you'll see some ...Discover More
Limiting what can be entered in a cell can be an important part of developing a worksheet that other people use. Here are ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.