

Ws.Range(Pt.TableRange2.Address).Delete Shift:=xlUp
Making a mac pivot chart in excell code#
So be absolutely sure when you do this, and if needed, create a backup copy to avoid losing these.īelow is the VBA code that will delete all Pivot Tables in one go: Sub DeleteAllPivotTables() In case you have multiple Pivot tables and you want to delete all of these at one go, you can do that using a simple VBA code.Ĭaution: Once you delete these Pivot Tables with the VBA code, you’ll not be able to get these back. In the Actions group, click on ‘Clear’ option.If you select the data and hit the delete key, it will delete the Pivot Table as well.īelow are the steps to keep the Pivot table and remove the resulting data only: If you want to only remove the data that you have got while keeping the Pivot Table (so that you can rearrange and create another summary), you can do that as well. Suppose you have created a Pivot Table and summarized the data (using filter and columns/rows headers to get the data you want) as shown below. Delete the Resulting Data but Keep the Pivot Table If you want to keep the resulting data only, and not the Pivot Table, make sure you paste as values. Note: When you copy data (Control C) from a Pivot Table and paste it (Control V) anywhere in the worksheet, it simply creates another Pivot Table. Once you have the data, you can then delete the Pivot Table. You can also use the same steps shown above to copy the data from the Pivot Table and pasting it as values at some other location (somewhere in the same worksheet or some other worksheet/workbook). Once you have selected the entire Pivot table and copied the data, you can use the following keyboard shortcut to paste as values – ALT+E+S+V+Enter (one key after the other).Select any cell in the Pivot Table and use the Keyboard ‘Control + A’ to select the entire Pivot Table.The above steps would delete the Pivot Table but still keep the resulting data. In the Paste Values section, click on the first icon (which is of Paste as Value).This will copy the data of the entire Pivot Table. Right-click on any cell of the selected Pivot Table.Deleting such a Pivot table can drastically reduce the Excel file size.įor example, in the below example, I want to remove the Pivot Table, but I still want to keep the data in cell A3:B8 This could be the case when you have used the Pivot Table and then want to send to your manager/client only the resulting data.Īnother case where this may be needed is when your Pivot Table is too heavy and is bloating your worksheet. There may be cases when you want to delete the Pivot table, but not the resulting data that you have got after using the Pivot table. Delete the Pivot Table but Keep the Resulting Data Of course, you wouldn’t want to do this if you have any other data in the worksheet. You need to use the method shown above (or select the Pivot Table manually)Īnother quick way to delete the Pivot Table is to simply delete the worksheet that has the Pivot Table. In case you have filters applied in the Pivot table, Control A will not select the entire Pivot Table. Note that you can also select the entire Pivot Table by selecting any cell and then using the keyboard shortcut ‘ Control + A‘. The above steps would delete the Pivot Table. In the Actions group, click on the ‘Select’ option.This is a contextual tab that appears only when you have selected any cell in the Pivot Table. Click on the ‘Analyze’ tab in the ribbon.

Delete the Pivot Table and the Resulting Dataīelow is an example where I have created a Pivot table and used it to get the Sum of Revenue for different regions (to which I will be referring to as Pivot Table summary data in this tutorial).īelow are the steps to delete the Pivot table as well as any summary data: Let’s dive in and see each of these methods. Delete the resulting data but keep the Pivot Table.Delete the Pivot Table but keep the resulting data.Delete the Pivot Table & the resulting data (the summary created using the Pivot Table).The method you choose will depend on how you want to delete the Pivot Table.īelow are some scenarios that I will be covering in this tutorial:

When it comes to deleting a Pivot Table, there are a few different ways you can do this. Since you’re reading a tutorial about removing or deleting a Pivot Table, I am assuming you already have a Pivot Table(s) in place that you want to remove.
