Power Query Problems

Create a Unique List from an Excel Query Table

John WilsonJohn Wilson Dec 2, 2026 868 views

Question details

Create a separate list containing one entry for each unique name in a query-loaded Excel table.

Create a Unique List from an Excel Query Table
Product
Microsoft Excel
Device & OS
not provided
Scenario
A database query loads a table with repeated names, and a separate summary needs one record per name.
Observed behavior
The desired result is a list of distinct names derived from the query table.
Before you start

Confirm that the query results are loaded into an Excel table and identify the table and name-column headers. To check the table name, select a cell in the table and open the Table Design tab.

Solution 1Recommended

Use a dynamic array formula to list unique names

Use this method in an Excel version that supports UNIQUE and SORT when you want a sorted list that updates with the table.

1
Select an empty cell

Click an empty cell outside the query table, with enough blank cells below it for the results.

2
Enter the formula

Enter =SORT(UNIQUE(Table1[Name])) and press Enter. Replace Table1 and Name with your actual table and column names.

3
Check the results

Review the spilled list below the formula. Refresh the source query from Data > Refresh All when you need updated database results.

Leave room for the list: If Excel shows a #SPILL! error, clear cells blocking the output range. Place the formula outside an Excel table.
Create a distinct list

List unique names with a WPS Spreadsheets PivotTable

Open your Excel workbook in WPS Spreadsheets and use a PivotTable to create a separate list with one row for each name.

  1. 1. Open the workbook: Open WPS Spreadsheets and choose Open to select the Excel workbook containing the source table.
  2. 2. Insert a PivotTable: Select a cell in the source table and choose Insert > PivotTable. Confirm the source range and choose a location for the PivotTable.
  3. 3. Add names to rows: In the PivotTable field list, drag the Name field to the Rows area to display each distinct name.
  4. 4. Refresh after changes: When the source table changes, right-click the PivotTable and select Refresh to update the list.
Group repeated names into distinct PivotTable rowsOpen and edit Microsoft Excel XLSX and XLS filesCreate a name summary using a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Which Excel versions support the UNIQUE formula?

UNIQUE is available in Excel versions with dynamic arrays, including Microsoft 365 and Excel 2021 or later. In older versions, use Insert > PivotTable or Power Query to create the list.

Why does my unique list show a #SPILL! error?

The formula needs empty cells for its results. Clear the cells blocking the spill range and enter the formula outside the Excel table.

How do I update the list after the database changes?

Use Data > Refresh All to refresh the source query. A UNIQUE formula recalculates from the updated table; a PivotTable may also need a right-click and Refresh.

Can I remove duplicates by name while keeping other columns?

Yes. In Power Query Editor, select the Name column and choose Home > Remove Rows > Remove Duplicates. One row is retained for each name, but check whether its other column values are the ones you need.