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.

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:

  1. Press F5. Excel displays the Go To dialog box.
  2. Click Special. Excel displays the Go To Special dialog box. (See Figure 1.)
  3. Figure 1. The Go To Special dialog box.

  4. Make sure the Constants radio button is selected. (This is extremely important—don't click any other option in the dialog box.)
  5. Click OK. All the cells containing constants (everything except formulas) are selected.
  6. Press the Del key.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using Custom Add-Ins

Once you've created your custom add-in, you need to know how you or other people can use it. Here are the simple steps to ...

Discover More

Professional Looking Fractions

Professional typesetting has, in many ways, spoiled us. One way this is evident is in the preference we show for making ...

Discover More

A Ruler in Excel

A few workarounds for the fact that Excel does not have a built-in ruler.

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Can't Empty the Clipboard

The Clipboard is essential to move or copy information from one place in Excel to another. If you get an error when you try ...

Discover More

Rounding in Results

Rounding is a fact of life when it comes to using formulas in a worksheet. Sometimes that rounding can be a bit confusing, ...

Discover More

Getting Rid of 8-Bit ASCII Characters

When working with data created outside of Excel, you may need to check that data to make sure it contains no unwanted ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.