Function Problems

How to Count Unique Parent Combinations with Criteria in Excel

Huda QurayshiHuda Qurayshi Oct 21, 2026 869 views

Question details

The user needs an Excel formula to count unique combinations of parent records from two columns, while filtering for 'Non-Member' status, ignoring blank student records, and handling OR logic for the parent fields.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Filtering a dataset with multiple specific criteria and counting the exact number of unique combinations across two concatenated columns.
Observed behavior
The standard array formula fails to correctly count the unique combinations when either parent column may be blank, requiring a more advanced setup using modern dynamic array functions and OR logic.
Before you start

Ensure you are using a modern version of Excel (Microsoft 365 or Excel 2021) or a compatible spreadsheet software that supports dynamic array functions like LET, FILTER, and UNIQUE.

Solution 1Recommended

Use LET, FILTER, and UNIQUE to Count Exact Combinations

This solution leverages modern Excel functions to filter rows by exact criteria and count unique concatenated string values.

By concatenating the two parent columns with a delimiter like the pipe symbol (|), you evaluate them as a single unique string. This prevents accidental false matches.

The LET function optimizes calculation by defining variables for the validation criteria and the resulting filtered array.

1
Select the destination cell

Click on the cell where you want the final count of unique parent combinations to appear.

2
Enter the LET and FILTER formula

Type the formula: =LET(valid,(E3:E50="Non-Member")*(A3:A50<>"")*(B3:B50<>""),parents,FILTER(C3:C50&"|"&D3:D50,valid),COUNTA(UNIQUE(parents)))

3
Calculate the result

Press Enter to execute the formula. It will dynamically filter for "Non-Member", ensure columns A and B are not blank, concatenate columns C and D, remove duplicates, and count the results.

Use LET, FILTER, and UNIQUE to Count Exact Combinations
Array Function Compatibility: LET, FILTER, and UNIQUE are dynamic array functions available only in Excel 2021, Microsoft 365, and modern alternative spreadsheet software.
Advanced Data Analysis in WPS

Count Unique Combinations Effortlessly in WPS Spreadsheet

WPS Spreadsheet fully supports advanced dynamic array formulas, making it incredibly simple to filter data, remove duplicates, and count unique combinations using the same functions you know from Microsoft Excel.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your parent and student records.
  2. 2. Select the target cell: Click on the cell where you want to display the final unique combination count.
  3. 3. Input the array formula: Type the identical =LET(...) and =UNIQUE(...) formula exactly as you would in Microsoft Excel.
  4. 4. Calculate instantly: Press Enter. WPS Spreadsheet will instantly process the array logic and display your unique combination count.
Fully compatible with Microsoft Excel formulas and file formats (.xlsx)Supports dynamic array functions like UNIQUE and FILTER out of the boxLightweight, fast, and completely free to use for everyday data analysis
microsoft office alternative - wps office

Frequently Asked Questions

How does the LET function work in this counting formula?

The LET function allows you to assign names to calculation results within the formula. In this context, 'valid' stores the True/False array of your filtering criteria, and 'parents' stores the filtered list. This makes the formula significantly easier to read and faster to calculate.

Can I count unique values in older spreadsheet versions without the UNIQUE function?

Yes, but it requires much more complex array formulas combining SUM, IF, and FREQUENCY or COUNTIF functions. It is highly recommended to upgrade to a version that supports dynamic arrays or use a free modern alternative like WPS Office.

Why use the pipe (|) symbol when combining columns?

The pipe symbol acts as a safe delimiter to prevent false matches. For example, directly joining 'John' and 'Smith' yields 'JohnSmith', which could accidentally match a first name 'JohnS' and last name 'mith'. The delimiter ensures 'John|Smith' remains distinctly evaluated.

How do I apply OR logic in Excel array formulas?

In array formulas, the asterisk (*) represents AND logic (both conditions must be true), while the plus sign (+) represents OR logic (either condition can be true). You enclose the OR conditions in parentheses, such as ((Condition1)+(Condition2)>0), to ensure they evaluate correctly before being combined with AND conditions.