Computer >> Computer tutorials >  >> Software >> Office

Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)

Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)

 

Dynamic array functions are among the most useful and powerful features. Instead of writing complex formulas that you copy down hundreds of rows, you write one formula that automatically “spills” results into as many cells as needed. When your data changes, these functions update in real time. This makes reports and summaries more efficient and less error-prone.

In this tutorial, we show 5 ways dynamic array functions (FILTER, UNIQUE, SORT) will change how you work.

Dynamic Arrays & Spilling in Excel

Dynamic arrays: Insert a formula in a cell, and Excel automatically fills or spills the results into the neighboring cells. If the result size changes (more rows, fewer rows), the spilled range grows or shrinks automatically. You’ll recognize a spilled range because:

  • The formula only lives in the top-left cell.
  • The other cells show a light border, and if you click them, you’ll see the formula greyed out.
  • You can refer to the entire spilled range as A2# (hash symbol).

Dynamic arrays are available in Microsoft 365 (Excel for Microsoft 365), Excel 2021, and later.

1. Generate Unique Lists for Summaries Without Duplicates

Before dynamic arrays, removing duplicates required either “Remove Duplicates” or complicated formulas. UNIQUE creates spillable, unique lists for quick summaries. It is ideal for dropdowns, validation lists, and pivot-free dashboards.
List Unique Region:

  • Select a cell and insert the following formula.

This formula spills a list of unique products.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Unique Combinations:
Get unique combinations of Region AND Salesperson:

This returns a two-column spill showing every unique combination.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Count Unique Orders:

  • Combine UNIQUE with COUNTA for a summary.

This formula calculates the total number of unique orders. If you add new rows in the dataset, the list refreshes automatically.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Values That Appear Exactly Once:
Find values that occur only a single time.

The third argument (TRUE) returns only values that aren’t repeated.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Use UNIQUE for Data Validation (Dropdowns):

  1. Select a cell where you want a dropdown.
  2. Go to the Data tab >> select Data Validation.
  3. Set Allow to List.
  4. In Source, type:

Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Now the dropdown always shows the current unique regions based on your data.
Grouped Summary Using UNIQUE:
You can pair UNIQUE with SUMIF to build a dynamic grouped summary.
Calculate the total revenue of different regions:

=SUMIF(B2:B61, I15#, G2:G61)

This formula refers to the entire list of spilled regions (I15#). SUMIF returns the total revenue for each area. Add or change rows in Sales, and the regions and totals adjust automatically.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Now, change the region and the Total Revenue will update automatically based on the selection.

2. Automatically Filter Data for Dynamic Reports

Traditional filtering requires manual filters or complex formulas. The FILTER() function is one of the most powerful tools for dynamic arrays. It extracts only the rows that meet your conditions and spills the result into a table-like range. Using this function, you can create a report that updates instantly.
Filter Sales by Region:

  • To show the dynamic behavior of the FILTER function, use a drop-down for the region.
=FILTER(A2:G61, B2:B61="East")
  • To make it more dynamic, reference the criteria cell from the drop-down.
=FILTER(A2:G61, B2:B61=I4)

This spills all rows where Region is “East.” It’s a mini report that expands or contracts if you add or remove data. Change I4 to “North,” and the report automatically updates—no VBA or manual refreshes needed.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
This eliminates static copies of data; your report always reflects the source.
Multiple Criteria:
Filter for the East region AND amounts over $1,000:

=FILTER(A2:G61, (B2:B61="East")*(G2:G61>1000), "No matches")

The asterisk (*) works as AND. You can use plus (+) for OR conditions.
You can build interactive dashboards where users select criteria from dropdowns.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)

3. Create Automatically Sorted Lists Using SORT() and SORTBY()

Sorting used to mean copying data or using tables. SORT creates dynamic, spillable sorted views. Whenever you add, remove, or update the dataset, it automatically sorts the data.
Auto-Sorted Sales Leaderboard:

This formula sorts the entire data range by column 7 (Amount) in descending order (-1). The original data stays untouched. Add a new top sale, and it automatically appears in the correct position.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Multiple Sort Levels:
Sort by Salesperson, then by Amount:

=SORT(A2:G61, {3,7}, {1,-1})

The curly brackets create arrays: sort by column 3 ascending, then column 7 descending.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Sort by Different Criteria:
The SORTBY function lets you sort one range based on values in another range.
Sort the entire range by salesperson name while keeping all columns:

=SORTBY(A2:G61, C2:C61, 1)

4. Combine FILTER and UNIQUE for Targeted Unique Summaries

For advanced summaries, you can combine functions to filter first, then uniquify, spilling a clean, auto-updating list. Combine functions to create reports that maintain themselves.

  • Select a cell and insert the following formula.
=UNIQUE(FILTER(D2:D61, B2:B61="North"))

This filters products from the North region, then spills unique ones.

  • Next, add the SORT function to sort the summary.
=SORT(UNIQUE(FILTER(D2:D61, B2:B61="North")))

Now the formula spills a sorted, unique product list.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
This replaces cumbersome array formulas like {=INDEX(…)} for unique filtered lists. Change the data or criteria, and it spills updates seamlessly for reports like regional product inventories.

5. Dynamic, Criteria-Driven Summary Pages (Combine FILTER, UNIQUE, SORT)

Now, combine these functions into a mini summary/reporting page that updates from a few criterion cells.
Build a region-level dashboard: a region dropdown (driven by UNIQUE), a filtered region list (FILTER), and a top-products-by-region list (FILTER + SORT).

Step 1: Region Dropdown Using UNIQUE

A list of unique regions has been created and used to build a drop-down.

Step 2: Region-Level Sales Details

=FILTER(SalesData!A2:G61, SalesData!B2:B61=B4, "No sales in this region")

This formula filters sales data based on region. Change the region from the drop-down and the sales table will update automatically.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)

Step 3: Top Products in Selected Region

Identify which products sell the most in the chosen region.

  • Create a small table with headers Product and Total Revenue.
  • In L4, get the unique products sold in the selected region:
=UNIQUE(FILTER(SalesData!D2:D61, SalesData!B2:B61=B4))

This spills a list of products for that region.

  • In M4, calculate total revenue per product in that region:
=SUMIFS(SalesData!G2:G61, SalesData!B2:B61, B4, SalesData!D2:D61, L4#)

This returns a spilled list of total revenues matching each product in L4#.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)

  • To show them sorted by revenue (descending), sort the two spilled columns together:
=SORT(CHOOSE({1,2}, L4#, M4#), 2, -1)

Here, CHOOSE({1,2}, L4#, M4#) builds a two-column array (Product and Total Revenue). 2 means “sort by the 2nd column (Total Revenue)”; -1 means descending order.
Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)
Dynamic Top Products in [Selected Region] Report:

  • Change the region dropdown in B4. Notice that all summaries are updated.
  • Add new data to Sales, and it will be added to the report.
  • No copied formulas, no manual sorting, no PivotTable refresh.

Transform Your Spreadsheets: 5 Dynamic Array Functions (FILTER, UNIQUE, SORT)

Conclusion

This tutorial demonstrates 5 ways dynamic array functions (FILTER, UNIQUE, SORT) change how you work. Dynamic array functions eliminate the busywork of maintaining spreadsheets. You focus on analysis instead of copying formulas and fixing broken references. Reports update themselves. Dashboards update automatically. Once you start using these functions, you’ll find they’re ideal for summaries and dashboards—you can build reports that update instantly with no manual refreshing, no complex array formulas, and no helper columns.

Get FREE Advanced Excel Exercises with Solutions!