Fix PivotTable Refresh Error: Requires at Least Two Rows in Excel
Question details
The user is experiencing an error when attempting to refresh a PivotTable or PivotChart, indicating that the source data is insufficient.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Updating or refreshing a PivotTable or PivotChart after data has been modified, deleted, or moved.
- Observed behavior
- An error message appears stating that the command requires at least two rows of source data, preventing the PivotTable from successfully refreshing.
Ensure your original source data has not been accidentally deleted and that the worksheet containing your raw data is still accessible before troubleshooting the PivotTable.
Check and Update the PivotTable Source Data Range
This error occurs when the PivotTable's defined data source range shrinks to a single row or an empty cell. Manually reselecting the full dataset including headers and data rows resolves the issue.
A valid PivotTable must reference at least two rows: one row for the column headers and at least one row containing the actual data records. If rows were deleted from your original data, the source reference might have broken.
Click anywhere inside your existing PivotTable to activate the PivotTable Tools on the top ribbon menu.
Navigate to the 'PivotTable Analyze' (or 'Options') tab on the ribbon, and click the 'Change Data Source' button.
In the 'Change PivotTable Data Source' dialog box, check the 'Table/Range' field. You will likely see that it points to an invalid range, such as a single row or an empty block.
Delete the incorrect range text. Use your mouse to highlight your complete dataset in the source worksheet, making sure you include the very top header row and all subsequent data rows beneath it.
Click 'OK' to apply the updated range. The PivotTable should immediately update and the refresh error will no longer appear.

Manage PivotTables Effortlessly in WPS Office
WPS Spreadsheet provides a highly compatible, fast, and intuitive interface for building, modifying, and refreshing PivotTables. Easily define dynamic data ranges to prevent row selection errors during complex data analysis.
- 1. Open your Workbook in WPS Spreadsheet: Launch WPS Office and open your .xlsx file containing the existing PivotTable.
- 2. Access PivotTable Tools: Click directly on the PivotTable to reveal the 'PivotTable Tools' tab in the top ribbon menu.
- 3. Update the Data Source: Click on 'Change Data Source', highlight your full data range (including headers and data rows), and click 'OK'.
- 4. Refresh Data: Click the 'Refresh' button on the ribbon to successfully update your PivotTable analysis.

Frequently Asked Questions
Why does my PivotTable source range shrink or change on its own?
If you delete rows at the top or bottom of your dataset, the static cell references in the PivotTable's source range can shift or shrink. This often leaves the PivotTable pointing to too few rows, triggering the two-row requirement error.
How can I prevent the 'requires at least two rows' error in the future?
Convert your source data into an official Table (by pressing Ctrl+T or inserting a Table). When you use a structured Table as your PivotTable source, the range dynamically expands and contracts as you add or remove rows, entirely avoiding manual range selection errors.
Can a PivotTable work if my source data contains blank rows?
Yes, a PivotTable can process datasets with blank rows, displaying them as '(blank)' in your report. However, if the entire selected source range is completely blank or is missing header labels, it will trigger an error. The first row selected must always contain headers.




