Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. 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 April 25, 2020)


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
        End If
        Set rng = Nothing
    Set wks = Nothing
End Sub


If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11168) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. 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. ...


Automatically Sorting as You Enter Information

When entering information into a worksheet, you may want it to always be in a correctly sorted order. Excel allows you to ...

Discover More

Fixing Odd Sorting Behavior

When you sort data that contains both numbers and text, you may not get exactly the result that you expected. To know ...

Discover More

Adding Spaces in Front of Capital Letters

Got some text that is "run together" and needs spaces inserted to improve readability? There are a variety of approaches ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Separating Text by Color

Excel allows you to use multiple colors to format the text in a cell. If you want to later separate that text to ...

Discover More

Conditionally Deleting Rows

Want to delete a bunch of rows in a worksheet based on the value in a certain cell of each row? There are a couple of ...

Discover More

Proper Case Conversion with Exceptions

The PROPER worksheet function allows you to change the case of text so that only the first letter of each word is ...

Discover More

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

View most recent newsletter.


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}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. 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 four minus 4?

2020-05-11 07:08:42

John Mann

I notie thar right at the befining of this tip, it is apecified that this Rkichard does this every year. I have a similar situation with the accounts of a small non-ptofit group of whifh I sm the treasurer. My wrok book has quite a lot of sheets,with one worksheet for each period of the finanical year, then summary sheets for echa period and for the year.

I solved the problem of starting a new workbook each year the easy way - I saved a blank copy of the workbook as atemplate. Now each year I simply creat a new worknook using the template. A simialr method, thoufh more work and more error prone would be to save an empty copy of the workbook, then each year upen the copy, do a Save As to make the new uear's work nook. This runs the risk of foretting to do the Save As before starting to enter data, and the extra step of opening then doing the Save As. The template file is to me the most obvious solution to Richard's original question.

2020-04-28 11:18:43



See the ExcelTips FAQ, here:

The third Q&A answers your question.


2020-04-28 11:08:09

Peter Clarke

Maybe I missed something when I subscribed to this blog a few months ago, but I understood that you included Excel for Mac in your discussions. I don't think I have yet to see any reference to Excel for Mac. As above, you give the "Press F5. Excel displays the Go To dialog box." On my MacBook Pro I push fn+F5 to get the Preference screen, not a Go to Special screen. (By the way, you only have Notes highlighted yet your text says, "Make sure the Constants radio button is selected. (This is extremely important—don't click any other option in the dialog box.)". Mixed messages here.
There ARE differences between the two platforms of Excel. It would be proper to not waste Mac users' time by identifying just what flavours of Excel that you are referring to.
Thanks. Be well.

2020-04-27 04:51:00

David Shepherd

Depending on the size and complexity of the workbook, another option might be to define a named range that includes all user-entry cells. Then use the named range to select the cells for deletion.

2020-04-26 14:29:31

Peter Atherton


The image was supposes to show the selection, this taken with the Snipping Tool is hopefully, better.
(see Figure 1 below)

Figure 1. Selection for deletion

2020-04-26 14:11:19

Peter Atherton

You could always follow the steps until OK ans see what is selected. The method deletes all Headers as well. I'd suggest the following Key Strokes: Ctrl + G, Alt + x, Alt + o, Alt + x, ENTER, (Del if happy)
The ALT + x de-selects Text

(see Figure 1 below)

Figure 1. 

2020-04-25 17:49:56

Clifton Schnarr

Hi Allen. Thanks for the helpful tip. Just one note. It would be helpful when you post, if you post an image of the settings you actually instruct us to set. In the posting your screen shot of the "Go To Special" dialogue box shows "Notes" being selected. If others like me have a tendency to go by the images in the post step by step, then we would not get the desired result. Also once we select "Constants" the options for "Formulas" (> Numbers, > Text, > Logicals, and > Errors) all become active and are all checked by default even though the "Formulas" radio button is not selected. You don't tell us what to do at this point. Do we need to uncheck these four options before proceeding, or is it not necessary? I will attempt to attach the dialogue box with only the constants radio button selected for your use. Many thanks for all your great tips! (see Figure 1 below)

Figure 1. 

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

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.