Create an Excel PivotTable from Dynamic Array Source Data
Question details
Create a PivotTable without manually maintaining a source range that changes with a UNIQUE dynamic array.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to analyze distinct values as the underlying source data changes.
- Observed behavior
- The UNIQUE formula's spill range can grow or shrink, making it difficult to maintain as a PivotTable source.
Locate the original data used by the UNIQUE formula and make sure each column has a header. Check that the data is arranged in a contiguous range with no entirely blank rows or columns.
Create the PivotTable from the original data
Use the raw records directly so the PivotTable can list distinct row or column labels without relying on the UNIQUE spill range.
Select a cell in the original data, choose Insert > Table, confirm the range, and select the option indicating that the table has headers.
Select a cell in the table, choose Insert > PivotTable, and confirm the table as the source. Choose where to place the PivotTable and select OK.
In the PivotTable Fields pane, drag the field whose distinct values you want to see into Rows or Columns. Drag other fields into Values or Filters as needed.
After adding or editing records in the source table, right-click the PivotTable and select Refresh. New rows added to the table are included when the PivotTable is refreshed.

Analyze original data with a PivotTable in WPS Spreadsheet
Use WPS Spreadsheet to build a PivotTable from the original records and list distinct field labels without maintaining a changing UNIQUE spill range.
- 1. Open the workbook: Open WPS Spreadsheet and use File > Open to select the workbook containing the original data.
- 2. Select the source: Select the original data range, including its column headers, rather than the UNIQUE formula's spill range.
- 3. Insert a PivotTable: Choose Insert > PivotTable, confirm the source range, and select a location for the PivotTable.
- 4. Add fields and refresh: Drag the field you want to list into Rows, and add other fields as needed. After editing source data, right-click the PivotTable and select Refresh. If new records fall outside the source range, update the PivotTable's source range or recreate it.

Frequently Asked Questions
Do I need a UNIQUE formula before creating the PivotTable?
No. Create the PivotTable from the original data and drag the relevant field into Rows or Columns to list its distinct labels.
How do I include new source records in the Excel PivotTable?
Create the PivotTable from an Excel table using Insert > Table. After adding records to that table, right-click the PivotTable and select Refresh.
Why does my PivotTable still show old results after I edit the data?
A PivotTable does not necessarily update immediately when its source changes. Right-click the PivotTable and select Refresh.
Does a PivotTable count distinct values automatically?
Not with a standard Count in Values. Row and column fields list distinct labels, while Count generally counts records. A distinct count requires a suitable PivotTable setup, such as adding the data to Excel's Data Model when creating the PivotTable.




