How to Delete All Charts in Excel
If we inserted a large number of charts and want to delete all of them quickly how can we do? It will spend a lot of time if we delete them one by one in excel. So we need a quick way to delete them all conveniently. This article will provide you some methods to delete all charts in excel, one is to delete them by Clear All, another one is to delete them by VAB code.
Table of Contents
Delete All Charts by Clear All in Excel
This method is only useful for the case that there are only some charts exist in excel.
Step 1: Hold on Ctrl button on keyboard, then click on the edge of each chart to select all charts in excel.
Step 2: In Home tab Editing group, click Clear->Clear All. Then all charts are cleared.
- User can also click Delete to clear all charts after highlighting all of them.
- Chart is made of frame, graphic, contents…, so if you only click on part of the chart like below, only the graphic or contents will be cleared.
Delete All Charts by VBA Code
Step 1: Click Develop->Code Group->Visual Basic (or Alt+F11) to load Microsoft Visual Basic for Applications window.
Step 2: Click Insert->Module.
Step 3: Paste below VBA code into the code window.
Sub DeleteAllCharts() Dim Chart As ChartObject For Each Chart In ActiveSheet.ChartObjects Chart.Delete Next End Sub
See screenshot below:
Step 4: Click Developer->Code group->Macros. In Macro window, select DeleteAllCharts, then click Run.
Step 5: Check all charts. Verify that all charts are cleared.