How to Unique Values With Multiple Criteria in Excel

Learn multiple Excel methods to return unique values based on several criteria with step-by-step examples, business-ready scenarios, and troubleshooting guidance.

excelformulaspreadsheettutorial
12 min read • Last updated: 7/2/2025

How to Unique Values With Multiple Criteria in Excel

Why This Task Matters in Excel

Imagine a sales director who wants to see which products were sold in a specific region during the last quarter, or an HR manager who needs a clean list of employees who have both completed training and still have active contracts. In both cases the question is the same: “Which values are unique after I apply more than one filter?” Returning a simple list of distinct items is easy, yet real-world data rarely comes in a single tidy column. We almost always need to narrow the list with additional rules—date, department, region, status, and so on.

Being able to pull unique values that meet several conditions has powerful downstream effects:

  • Faster analysis: You can immediately focus on the subset that matters instead of sifting through everything manually.
  • Improved reporting: Dashboards, pivot tables, and Power BI data models often rely on accurate dimension lists. Producing them dynamically keeps reports self-updating.
  • Error reduction: Manual copy-paste or advanced filtering can introduce mistakes. Robust formulas eliminate that risk.
  • Workflow automation: When you connect the result to data-validation drop-downs or dynamic charts, you enable one-click exploration of vast data sets.

Industries from retail (finding SKUs sold in both physical and online stores) to finance (unique ticker symbols that breached two technical indicators) rely on this capability. Excel is particularly well-suited because it offers multiple layers of functionality: dynamic array functions (UNIQUE, FILTER), legacy array formulas (INDEX, MATCH, FREQUENCY), and interface tools such as advanced filter or pivot tables. Missing this skill forces users into time-consuming manual work, bloated files full of helper columns, or recurring copy-paste jobs that break the moment new rows come in. Once you learn how to derive unique values with multiple criteria, you unlock a foundation for countless analytical tasks—everything from quality-control exception lists to customer segmentation pipelines.

Best Excel Approach

The most effective modern approach is to combine FILTER and UNIQUE in a single dynamic-array formula. FILTER narrows the data set to rows that satisfy every criterion; UNIQUE then removes duplicates from the surviving values. The result “spills” into neighboring cells, automatically resizing when source data grows or shrinks.

Choose this method when you are on Microsoft 365 or Excel 2021, where dynamic arrays are fully supported. It outperforms older array formulas because it is shorter, easier to read, and recalculates more efficiently. If you need to support colleagues on Excel 2016 or earlier, alternative methods are covered later.

General pattern:

=UNIQUE(
    FILTER(
        return_range,
        (criteria1_range = criteria1_value) *
        (criteria2_range = criteria2_value) *
        ...
    )
)
  • return_range – The column (or columns) from which you want the unique results.
  • criteria_range – Each range must be the same shape as return_range.
  • criteria_value – Constants, cell references, or arrays defining the restrictions.
  • Multiplication * acts as the AND operator; using + would act as OR.

When one criterion is numerical (for example “date in current quarter”), use relational operators inside FILTER: (date_range >= start_date) * (date_range <= end_date). As long as every sub-expression returns TRUE or FALSE, multiplying them forces TRUE only when all tests pass.

Alternative dynamic-array approach (if you prefer a helper FILTER step you can see on the sheet):

=UNIQUE(filtered_values)

Where filtered_values is itself a FILTER formula. This adds transparency at the cost of an extra spill range.

Parameters and Inputs

The solution requires three types of inputs:

  1. return_range – The contiguous column (or several adjacent columns) you plan to de-duplicate. It must contain the values you want listed. For text, number, or date content the function treats every unique combination of characters as a distinct value.
  2. criteria_range(s) – One or more ranges the same size as return_range. Mismatched row counts cause a #VALUE! error in FILTER. Always check that your ranges start and end in the same rows.
  3. criteria_value(s) – The rule you are applying. This can be:
    • A fixed literal such as \"East\" or 100
    • A reference to a cell containing the rule
    • A dynamic expression, e.g., TODAY() for rolling date filters

Optional but recommended preparation steps:

  • Remove leading/trailing spaces with TRIM or CLEAN to avoid accidental mismatches.
  • Ensure data types align (do not compare numeric strings to real numbers).
  • Convert your source into an official Excel Table (Ctrl + T). This locks ranges with structured references so new rows are captured automatically.

Edge case handling:

  • Empty cells in return_range are treated as an empty string; duplicates of blank will collapse to a single blank.
  • If FILTER returns zero rows, UNIQUE outputs #CALC! (“No match was found”). Wrap the entire formula in IFERROR to display a custom message such as \"None\".

Step-by-Step Examples

Example 1: Basic Scenario – Unique Products Sold by One Sales Rep

Suppose you maintain a weekly sales log with three columns: Rep, Product, and Units. In sheet [SalesLog] rows 2:101 hold the last hundred transactions. The marketing team asks: “Which products did Maria sell at all? We don’t care how many times—just list each product once.”

  1. Create an Excel Table called tblSales. Columns: Rep, Product, Units.
  2. In any spare cell (say D2) type the following:
=UNIQUE(
    FILTER(
        tblSales[Product],
        tblSales[Rep]="Maria"
    )
)
  1. Press Enter. If you’re on 365 the result spills downward, listing each distinct product Maria handled.
  2. Style the spill range with a solid border to show it is dynamic.

Why this works:

  • FILTER screens tblSales[Product] but keeps only those rows whose Rep equals \"Maria\".
  • UNIQUE collapses duplicate products so each appears once.
  • Because tblSales expands as new rows arrive, the list updates automatically.

Common variations:

  • Reference a dropdown cell instead of \"Maria\": tblSales[Rep]=$G$1.
  • Sort the resulting list by nesting SORT around UNIQUE.

Troubleshooting tips:

  • If you see #SPILL!, check that no other data blocks the output cells.
  • If Maria has no sales, you’ll receive #CALC!. Wrap with IFERROR.
  • Verify spelling—\"Maria\" versus \"Mariah\" will not match.

Example 2: Real-World Application – HR Compliance Reporting

An HR department stores every employee in tblStaff with columns: EmpID, Department, Status, TrainingComplete (TRUE/FALSE). Quarterly they must send auditors a list of currently active employees in the “Manufacturing” department who still need training. In other words, unique EmpID where Status = \"Active\" AND Department = \"Manufacturing\" AND TrainingComplete = FALSE.

  1. Confirm tblStaff is defined; header row is on sheet [HRData].
  2. Enter the formula in J2:
=UNIQUE(
    FILTER(
        tblStaff[EmpID],
        (tblStaff[Status]="Active") *
        (tblStaff[Department]="Manufacturing") *
        (tblStaff[TrainingComplete]=FALSE)
    )
)
  1. Add a descriptive label “Outstanding Training – Manufacturing” above the spill range; this automatically resizes.
  2. Send this list to auditors or hook it to a dashboard card displaying COUNTA of the spill range to show a numeric badge.

Business impact:

  • The auditor gets exactly the IDs they need, no more, no less.
  • HR never touches the formula again; when a new hire is added, the list adjusts.
  • You can power data-validation on another sheet (e.g., “Mark Training Complete”) with the distinctly filtered EmpIDs, guaranteeing the drop-down never shows duplicates or already-trained staff.

Integration:

  • Combine with conditional formatting on tblStaff to highlight the same filtered rows for quick visual checks.
  • Feed the spill range into XLOOKUP to return email addresses when sending reminder emails.

Performance considerations:

  • tblStaff might have tens of thousands of rows. Dynamic arrays are vectorised and calculate quickly, but heavy nesting can slow down older hardware. Indexing only the required columns (as we did by selecting tblStaff[EmpID]) keeps memory use low.

Example 3: Advanced Technique – Unique Customers by Year and Region with Optional OR Logic

A revenue analyst wants unique customer names that meet the following rules:

  • Region is either \"North\" OR \"West\".
  • Invoice date falls in the chosen fiscal year (cell B1 contains the year number).
    Dataset tblInvoices includes: CustName, Region, InvoiceDate, Amount.

Steps:

  1. Create helper cells:
  • B\1 = 2024 (selected fiscal year)
  • B\2 = TEXTJOIN(\",\",TRUE,\"North\",\"West\") for display only
  1. Enter the combination formula in G2:
=UNIQUE(
    FILTER(
        tblInvoices[CustName],
        ((tblInvoices[Region]="North") +
         (tblInvoices[Region]="West")) *
        (YEAR(tblInvoices[InvoiceDate])=$B$1)
    )
)

Explanation:

  • OR logic is implemented with +. If either condition is TRUE the sum equals 1, which FILTER treats as TRUE.
  • AND logic with the year check uses multiplication. Region must match one of the two, and invoice year must match B1.
  • YEAR extracts the calendar year from each InvoiceDate without helper columns.

Optimization: If tblInvoices has hundreds of thousands of rows, ARRAYTOTEXT comparisons on dates can be slow. A faster approach is to pre-filter by date using one range reference instead of YEAR in every row. Add start and end date cells (B3, B4) and replace the year test with:

(tblInvoices[InvoiceDate] >= $B$3) *
(tblInvoices[InvoiceDate] <= $B$4)

Edge cases:

  • Duplicate customer names with different letter cases count as different unless you normalize with UPPER or LOWER inside UNIQUE.
  • If Region contains extra spaces (\"North \"), wrap TRIM around the comparison range.

Professional tips:

  • Assign the spill range to a named range (Formulas ➜ Define Name) called NorthWestCust. Other formulas or charts can then reference =NorthWestCust without worrying about changing size.
  • Combine with LET to store sub-calculations, reducing repetition and increasing readability. Example:
=LET(
    rRegion, tblInvoices[Region],
    rDate, tblInvoices[InvoiceDate],
    rName, tblInvoices[CustName],
    matchRegion, (rRegion="North") + (rRegion="West"),
    matchYear, YEAR(rDate)=$B$1,
    UNIQUE( FILTER( rName, matchRegion * matchYear ) )
)

Tips and Best Practices

  1. Convert source data to an Excel Table first. Structured references keep formulas readable and self-expanding.
  2. Use cell references instead of hard-coding criteria. This allows for easy what-if analysis and interactive dashboards.
  3. Store partial results with LET when your criteria get long; it simplifies maintenance and can speed up recalc.
  4. Wrap the final formula in SORT for presentation-ready alphabetical (or numerical) order: =SORT( … ).
  5. Protect spill ranges with worksheet protection or light gray shading, reminding colleagues not to overwrite them.
  6. Combine UNIQUE + FILTER with data validation to create context-aware drop-downs that never show duplicates.

Common Mistakes to Avoid

  1. Mismatched range sizes – FILTER demands that every criteria_range line up with return_range. Crossing different starting rows yields #VALUE!. Always select whole columns within the same table or create parallel ranges.
  2. Forgetting parentheses around each logical test – Multiplication applies only to adjacent terms. (A=B)*(C=D) is correct; without parentheses, operator precedence may lead to unexpected casts.
  3. Using text criteria with inconsistent case or extra spaces – “North” versus “north” will not match. Normalize the data or wrap UPPER on both sides of the comparison.
  4. Overwriting spill results – Any value typed inside the expected spill footprint throws a #SPILL! error. Keep a blank buffer row/column or convert the spill range to a static list when finalizing.
  5. Not accounting for no-match situations – If every filter returns FALSE, users see #CALC!. Surround the main formula with IFERROR or test with COUNTA first to display “No items” instead.

Alternative Methods

There are times when modern dynamic arrays are unavailable or when you need a pivot-table-like interface. Below is a comparison of common alternatives.

MethodExcel VersionStrengthsWeaknessesIdeal When
UNIQUE + FILTER365 / 2021Short, readable, auto-spilling, fastRequires latest ExcelYou control the workbook environment
Advanced Filter (Data ➜ Advanced)All versionsNo formulas, can copy to another locationManual refresh or VBA neededOne-off extraction tasks
Pivot Table (Distinct Count)2013+GUI, fast aggregation on large dataExtra clicks to refresh, output not in simple list formReports that need counts as well
INDEX/MATCH with COUNTIF helper2010+Compatible with older versionsComplex array formulas, harder to auditMixed team versions
Power Query2010+ with add-inExtremely large data, merges, transformsResults load to sheet or model only after refreshETL workflows feeding Power BI

Migration strategy: If you currently rely on INDEX + MATCH arrays, transition gradually by creating parallel UNIQUE + FILTER formulas and validating results. Once confidence is gained, retire legacy formulas.

FAQ

When should I use this approach?

Use UNIQUE + FILTER anytime you need a live list that automatically updates as data changes and you’re working in Microsoft 365 or Excel 2021. It excels for dashboards, dependent drop-downs, and operational reports where duplicate lines are common.

Can this work across multiple sheets?

Yes. Refer to fully qualified ranges such as Sheet2!A2:A200. When using Excel Tables, you can reference them regardless of sheet location: tblSales[Rep]. Just make sure every referenced range is the same height.

What are the limitations?

Dynamic arrays spill only in one direction (down then right). They cannot spill into merged cells or protected ranges. In addition, FILTER cannot reference closed external workbooks.

How do I handle errors?

Wrap the outermost UNIQUE in IFERROR:

=IFERROR(
    UNIQUE( FILTER( … ) ),
    "No matches"
)

For debugging, test each criterion separately to isolate which one filters out everything.

Does this work in older Excel versions?

UNIQUE and FILTER are absent in Excel 2016 and earlier. Use Advanced Filter, pivot tables, or the INDEX + MATCH + COUNTIF pattern. Alternatively, install the free Power Query add-in (Excel 2010/2013) and perform “Remove Duplicates” after filtering in the query editor.

What about performance with large datasets?

Dynamic arrays are highly optimized. Still, avoid volatile functions inside criteria (e.g., TODAY) if they are not necessary; they recalculate every change. Pre-calculate boundary dates in helper cells to limit recalculation. For 100k+ rows consider loading the table to the data model and using DAX for de-duplication.

Conclusion

Mastering unique values with multiple criteria streamlines data analysis, reduces manual errors, and empowers dynamic reporting. By leveraging FILTER and UNIQUE you harness Excel’s modern, calculation-engine upgrades, turning complex multi-step tasks into single elegant formulas. Apply these techniques to HR compliance, sales territory lists, audit extracts, or any scenario where clean, condition-based lists matter. Continue exploring LET, LAMBDA, and Power Query to push your automation further, and you’ll soon transform raw spreadsheets into intelligent, self-updating assets.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.