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
1. Delete All Charts by Clear All in Excel
Let’s start by exploring the first method in this tutorial. We’ll show you how to delete all charts in Excel using a simple yet effective approach – the “Clean All” button.
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.
2. 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.
3. Video: Delete All Charts
In this video, we’ll explore two efficient methods to delete all charts – one using the “Clean All” button, and the other leveraging VBA macros in Excel 2013/2016/2019.
4. SAMPLE FIlES
Below are sample files in Microsoft Excel that you can download for reference if you wish.