Welcome toExcel.Tips.Net
Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site
Adding a Little Animation to Your Life
Converting a Range of URLs to Hyperlinks
Making the Formula Bar Persistent
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:
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 (3308) applies to Microsoft Excel versions: 97 2000 2002 2003 2007
A Picture is Worth Thousands! Your worksheets are not limited to holding numbers and text. You can also add graphics or easily create charts based on your data. Excel Graphics and Charts, available in two versions, helps you make your graphics and charts their absolute best.