Yes, you can remove a pivot table in Excel by selecting it and pressing Delete, or by clearing its contents via the PivotTable Analyze tab. The exact method depends on whether you want to delete just the report, the underlying cache, or the source data—this guide covers all the options.
What a Pivot Table Actually Is
A pivot table is a data summarization tool that groups, counts, sorts, and totals data stored in another location (a range or table). It consists of two parts: the visible report (the grid you see) and the pivot cache (an invisible in-memory copy of the source data). When you delete a pivot table, you usually remove only the visible report; the cache often remains in the workbook, which can bloat the file size.
Method 1: Delete the Pivot Table Report (Quickest)
If you just want the report gone but don’t care about the cache, follow these steps:
- Click anywhere inside the pivot table to activate the PivotTable Analyze tab (called Analyze in older versions).
- Go to the Actions group and click Select > Entire PivotTable.
- Press the Delete key on your keyboard.
Alternatively, you can select the entire range manually with your mouse and press Delete. This removes the data and formatting but leaves the pivot cache intact.
Method 2: Clear the Pivot Table (Keep the Report Structure)
If you want to keep the pivot table’s layout and formatting but remove all data and filters, use the Clear command:
- Click inside the pivot table.
- Go to PivotTable Analyze > Actions > Clear > Clear All.
This empties the values, row labels, and column labels, but the pivot table object remains (showing empty fields). It’s useful when you want to reuse the same structure with different data.
Method 3: Delete the Pivot Table and Its Cache (Reduce File Size)
The pivot cache is stored separately and can significantly increase file size. To remove both the report and the cache, you need to delete the pivot table and then clear the cache. Here’s how:
- Delete the pivot table using Method 1.
- Go to File > Options > Data.
- Under Data options, you’ll see a button labeled Edit Default Layout—but that’s not what you need. Instead, look for the PivotTable Data Options section and click Release memory (this is not a standard button; actually, the correct way is to use VBA or to copy the worksheet).
In practice, the simplest way to remove the cache is to copy the worksheet to a new workbook, or use a VBA macro to delete the cache. For most users, copying the sheet to a new workbook and saving it will strip the cache.
Method 4: Delete the Entire Worksheet (If the Pivot Table Is the Only Content)
If the pivot table occupies the entire sheet, you can delete the whole worksheet:
- Right-click the sheet tab at the bottom.
- Select Delete.
- Confirm the deletion.
This removes everything on that sheet, including the pivot table and its cache (since the cache is stored with the sheet’s data structure).
Common Problems and Misconceptions
“Delete” doesn’t work? If pressing Delete doesn’t remove the pivot table, you might have a filtered selection or the sheet is protected. Unprotect the sheet first (Review > Unprotect Sheet).
“I deleted it, but the file is still huge.” That’s because the pivot cache remains. Use the copy-sheet method or a VBA macro to purge it.
“Can I undo a deletion?” Yes, if you delete the report with the Delete key, you can press Ctrl+Z (Undo) immediately. But if you delete a worksheet, you cannot undo it unless you saved a backup.
How to Remove a Pivot Table in Google Sheets
In Google Sheets, the process is simpler:
- Click anywhere on the pivot table.
- Click the small arrow at the top-right of the pivot table editor (or right-click and select Delete pivot table).
- Confirm deletion.
Google Sheets automatically removes the cache when you delete the pivot table, so no extra steps are needed.
Removing Pivot Table with VBA (For Multiple Tables)
If you have many pivot tables, you can use a macro to delete them all. Remember to save a copy of your workbook before running any macro, as macros cannot be undone with Ctrl+Z.
Sub DeleteAllPivotTables()
Dim ws As Worksheet
Dim pt As PivotTable
' Loop through each worksheet
For Each ws In ThisWorkbook.Worksheets
' Loop through each pivot table on that sheet
For Each pt In ws.PivotTables
pt.TableRange2.ClearContents
Next pt
Next ws
End Sub
This clears the contents of every pivot table on every sheet. To delete the entire pivot table object (not just contents), you would need to use pt.TableRange2.Delete instead, but that can leave empty shapes.
Frequently Asked Questions
Why can’t I delete a pivot table with the Delete key? Usually because the pivot table is part of a group or the sheet is protected. Check for protection and ungroup if necessary.
Does deleting a pivot table affect my source data? No. The source data remains untouched. Only the summary report is removed.
How do I remove a pivot table but keep the data? Simply delete the pivot table report (Method 1). The original data stays in its original location.
Can I remove just one field from a pivot table? Yes, uncheck the field in the PivotTable Field List, or drag it out of the Rows/Columns/Values area. That doesn’t delete the pivot table.
What’s the difference between “Clear” and “Delete”? Clear removes the data but keeps the pivot table structure; Delete removes the entire report. Clear is reversible with Undo, Delete is also reversible with Undo if done immediately.
Will removing a pivot table speed up my workbook? Only if you also remove the cache. The cache is what causes slow performance and large file sizes.
Related
- K Value to R Value Calculator: Convert Instantly
- Does Java Have Enums? Yes, and Here’s How They Work
- Solar Panel and Battery Calculator: Sizing Guide
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Does Excel Have a Funnel Chart? How to Create OneYes. Microsoft Excel for Microsoft 365 on Windows includes a built-in Funnel chart for showing values across stages…
- How to Make a Graph in the Google Sheets Mobile AppTo make a graph in the Google Sheets mobile app, select the cells you want to show, tap…
- Google Sheets Pivot Table: How to Show FiltersYes, Google Sheets pivot tables can show filters, and you control them directly from the pivot table editor…
- Insert Line Sparklines in Excel: Steps, Tips, and UsesTo insert a line sparkline in Excel for Microsoft 365 on Windows, select the cell or cells where…
- Excel Scatter Plot: Add a Second Y-AxisYes. In Excel for Microsoft 365 on Windows, select the data series you want to scale separately, right-click…
- Adding a Column to a Pivot Table: Quick StepsTo add a column to a pivot table in Microsoft Excel, you simply add a new field to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.