How to Select an Entire Excel PivotTable with a Keyboard Shortcut
Question details
The user needs a way to select a complete Excel PivotTable, including the report filter fields, using a keyboard shortcut because default shortcuts are insufficient.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Attempting to highlight and select an entire PivotTable quickly via the keyboard for formatting or copying purposes.
- Observed behavior
- Standard shortcuts like Ctrl+A or Ctrl+Shift+* only select the main body of the PivotTable, completely excluding the filter fields at the top of the table.
Before proceeding, ensure you have enabled the Developer tab in your Excel ribbon and are prepared to save your file as a Macro-Enabled Workbook (.xlsm).
Use a VBA Macro and Assign a Custom Keyboard Shortcut
Since native Excel shortcuts exclude the filter fields, creating a brief VBA macro is the most effective workaround to select the full PivotTable range with a custom key combination.
Microsoft Excel does not currently provide a native keyboard shortcut to select a PivotTable alongside its report filters. By utilizing a simple VBA script that calls the 'TableRange2' property, you can easily bypass this limitation.
Press Alt + F11 on your keyboard to open the Microsoft Visual Basic for Applications (VBA) window.
In the top menu bar, click 'Insert' and select 'Module' to create a blank scripting window.
Type or paste the following code exactly as shown: Sub SelectEntirePivotTable() ActiveCell.PivotTable.TableRange2.Select End Sub
Close the VBA Editor to return to your worksheet. Press Alt + F8 to open the Macro dialog box, select 'SelectEntirePivotTable', click 'Options', and assign your preferred shortcut key (e.g., Ctrl + Shift + P).
A Seamless and Free Alternative to Microsoft Excel
Struggling with missing shortcuts and limitations in Excel? WPS Office offers a free, lightweight, and highly compatible alternative. Manage complex datasets, build PivotTables, and enjoy a familiar interface without the steep price tag.
- 1. Download WPS Office: Visit the official WPS website to download and install the free suite on your device.
- 2. Open Your Excel File: Launch WPS Spreadsheet and open your existing .xlsx workbook.
- 3. Manage PivotTables seamlessly: Access all your existing PivotTables and analyze your data with complete format compatibility.

Frequently Asked Questions
Why doesn't Ctrl+A select the entire PivotTable?
By default, pressing Ctrl+A inside a PivotTable only selects the 'current region', which includes the data body and row/column labels but intentionally excludes page filters. This design prevents accidental formatting or deletion of the filter fields.
How can I select the entire PivotTable using the ribbon menu instead of a shortcut?
Click any cell within your PivotTable, navigate to the 'PivotTable Analyze' tab (or 'Options' in older versions of Excel), click the 'Select' dropdown button in the Actions group, and choose 'Entire PivotTable'.
What is the difference between TableRange1 and TableRange2 in VBA?
In Excel VBA, the 'TableRange1' property refers to the PivotTable area excluding the page (report filter) fields. The 'TableRange2' property includes the entire PivotTable structure, encompassing both the data body and the page filter fields at the top.




