Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Create self-expanding Excel lists with Tables, UNIQUE, SORT, and FILTER

Use an expanding source Table and spill formulas outside it to build unique lists, sorted results, and filtered reports that include new rows.

Table of Contents

For a report that grows with new rows, combine an Excel Table as the source with dynamic-array formulas outside the Table. A spill formula expands its output, but a fixed reference such as R2:R3004 will not automatically include data entered below row 3004.

Prepare an expanding source

  1. Select your data, including headers, and press Ctrl + T.
  2. Confirm that the range has headers and name the Table Employees.
  3. For the examples below, use three columns in this order: Name, Department, and Salary. Enter salaries as numbers.
  4. Place report formulas on a clear area of the worksheet outside the Table.

Use an Excel version that supports these functions, such as Microsoft 365, Excel 2021, or Excel 2024. A #NAME? error may indicate an unsupported function or misspelled name.

Create a unique department list

=UNIQUE(Employees[Department])

This returns each distinct department. If the source contains blanks, you can exclude them:

=UNIQUE(FILTER(Employees[Department],Employees[Department]<>"",""))

This Excel trick will end the pain of resizing tables! Picture 1

For values occurring exactly once, use =UNIQUE(Employees[Department],,TRUE). This counts occurrences in the source; it does not independently establish whether a department is understaffed.

Sort the result automatically

=SORT(UNIQUE(Employees[Department]))

To sort complete employee rows by Salary, the third column in this example, from highest to lowest:

=SORT(Employees,3,-1)

This Excel trick will end the pain of resizing tables! Picture 2

Clean inconsistent department labels and numbers stored as text before interpreting results. Avoid whole-column arrays when a Table reference can identify just the actual data.

Filter rows into a report

=FILTER(Employees,Employees[Department]="Sales","No results found")

This shows rows whose Department is Sales. To require both Sales and a salary above 50000, combine conditions with multiplication:

=FILTER(Employees,(Employees[Department]="Sales")*(Employees[Salary]>50000),"No results found")

This Excel trick will end the pain of resizing tables! Picture 3

The * acts as AND here. Both conditions must be true. The final argument provides a result when no row matches.

This Excel trick will end the pain of resizing tables! Picture 4

The screenshots use an earlier column layout; adapt those letter-based references or use the consistent Table examples above.

Fix spill problems and test new rows

Edit the formula in its top-left cell. Other cells in the spill range are generated results and cannot be edited individually. If Excel shows #SPILL!, inspect the highlighted target range for blocking data, merged cells, a Table boundary, or the worksheet edge. Move valuable data rather than deleting it blindly.

Add a test row to the source Table and confirm the report updates, then remove the test row. If it does not, check that the row actually joined the Table and that calculation is enabled.

See more FILTER examples and safe sorting and filtering. Microsoft's spill documentation explains the distinction between source Tables and output arrays.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.