How to Automate UNIQUE and FILTER for Multiple Identifiers in Excel
Question details
The user needs a dynamic Excel formula to automatically extract and return unique identifiers for various names and categories without manual formula adjustments for each new identifier.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Automating data extraction and filtering across multiple criteria to build a dynamic report or dashboard.
- Observed behavior
- A scalable formula is required to handle data changes dynamically, avoiding repetitive manual input and returning expected unique lists automatically.
Ensure your version of Excel supports Dynamic Arrays (Excel 365 or Excel 2021) and clearly identify the ranges for your source data columns, such as Names, Identifiers, and Categories, before writing the formula.
Combine UNIQUE and FILTER for Multiple Criteria
Use nested UNIQUE and FILTER functions to extract a distinct list of identifiers that meet several conditions simultaneously.
By nesting FILTER inside the UNIQUE function, you can first narrow down your dataset using multiple criteria (like specific names and categories) and then extract only the distinct values from that filtered list.
Using boolean logic with asterisks (*) simulates the AND criteria, ensuring that all specified conditions are met before data is extracted.
Click on the empty cell where you want the dynamic array results to begin spilling.
Type `=FILTER(B2:B100, (A2:A100="TargetName") * (C2:C100="TargetCategory"))` to filter your identifiers (Column B) based on your Name (Column A) and Category (Column C) criteria.
Modify your formula to include the UNIQUE function: `=UNIQUE(FILTER(B2:B100, (A2:A100="TargetName") * (C2:C100="TargetCategory")))`.
Press Enter. The formula will automatically spill the distinct, filtered identifiers down the column.

Use MAP or REDUCE for Complex Iterations
Leverage LAMBDA helper functions like MAP to iterate over an array of multiple names or categories simultaneously.
Automate Dynamic Arrays effortlessly with WPS Spreadsheet
WPS Spreadsheet fully supports advanced modern functions like UNIQUE, FILTER, MAP, and REDUCE. You can build powerful, automated data extraction models without needing complex macros or VBA.
- 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your raw data.
- 2. Select target output cell: Click on the cell where you want the filtered and unique list to be generated.
- 3. Input the dynamic formula: Type your combination formula, such as `=UNIQUE(FILTER(Range, Criteria))`, directly into the formula bar.
- 4. Press Enter to spill: Hit Enter to instantly generate the spilled array of results, which will update dynamically as source data changes.

Frequently Asked Questions
Why am I getting a #SPILL! error when using UNIQUE and FILTER?
A #SPILL! error happens when the dynamic array needs room to populate its results, but there are existing values, spaces, or merged cells blocking the way. Clear all cells below and to the right of your formula to fix this issue.
How do I filter data using multiple 'OR' criteria?
To use OR logic in your FILTER formula, replace the multiplication asterisk (*) with a plus sign (+). For example, `=FILTER(A2:A100, (B2:B100="Category1") + (B2:B100="Category2"))` will return rows that match either Category1 or Category2.
What happens if the FILTER function finds no matches?
By default, FILTER will return a #CALC! error if no records match the criteria. To avoid this, use the optional [if_empty] argument. For example: `=FILTER(A2:A100, B2:B100="Missing", "No data found")`.
Can I use dynamic arrays like UNIQUE and FILTER on older spreadsheet versions?
No, these functions rely on the new dynamic calculation engine. They are only available in Excel 365, Excel 2021, or modern alternative suites like WPS Office. If opened in older versions like Excel 2016, they may show an _xlfn prefix or return errors.




