How to Count Unique Serial Number and Symptom Combinations in Excel
Question details
The user needs to count the number of distinct repair instances by evaluating unique combinations of a serial number and a symptom in a spreadsheet.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Analyzing repair logs or tracking service tickets where identical serial numbers might have different repair symptoms, requiring accurate combination counting.
- Observed behavior
- The user requires a reliable formula to group and count exact combinations accurately, avoiding the ambiguities of overlapping partial text matches (e.g., matching 'Black Screen' with 'No Boot - Black Screen').
Ensure your data ranges for serial numbers and symptoms are of equal length and do not contain accidental trailing spaces, as these will cause identical text strings to be recognized as unique items.
Use UNIQUE and HSTACK Functions (Recommended)
This is the most modern and reliable method for Microsoft 365 or latest WPS Spreadsheet versions, leveraging dynamic arrays to instantly filter and count unique data pairs.
By horizontally stacking the two columns and filtering for unique rows, you can get an exact count of distinct serial-number and symptom pairs. This avoids the pitfalls of partial matching.
Click on an empty cell where you want the total count to be displayed.
Type the formula =ROWS(UNIQUE(HSTACK(C:C,F:F)))-1 into the formula bar. Replace C:C and F:F with the exact column letters containing your serial numbers and symptoms.
Press the Enter key to calculate the result.

Use SUMPRODUCT and COUNTIFS Functions
This classic method works perfectly in older spreadsheet versions that do not support dynamic array functions like UNIQUE or HSTACK.
Use UNIQUE and CHOOSECOLS Functions
This method isolates specific columns from a larger data table to evaluate exact duplicate pairs.
Easily Count Unique Value Combinations with WPS Spreadsheet
Analyze your repair logs and service tickets efficiently with WPS Office. Our spreadsheet application fully supports advanced dynamic array functions like UNIQUE, HSTACK, and CHOOSECOLS, allowing you to instantly extract and count distinct data pairs.
- 1. Open your data file: Launch WPS Spreadsheet and open the document containing your repair logs.
- 2. Select a cell: Click an empty cell where you want the total count of unique combinations to appear.
- 3. Enter the formula: Type =ROWS(UNIQUE(HSTACK(C2:C100,F2:F100))) into the formula bar.
- 4. Press Enter: Hit Enter to instantly calculate the exact number of distinct repair instances.

Frequently Asked Questions
Why is partial matching dangerous for tracking repair symptoms?
Partial matching can be highly ambiguous. For instance, the text 'Black Screen' might accidentally trigger a match with 'No Boot - Black Screen'. This overlap leads to miscounts in your repair logs. Using exact matching ensures each specific symptom is counted correctly.
Can I use COUNTIFS to count unique pairs instead of SUMPRODUCT?
By itself, COUNTIFS only counts total occurrences of criteria. Wrapping it inside =SUMPRODUCT(1/COUNTIFS(...)) is necessary because it forces the spreadsheet to calculate fractional values for duplicate rows that eventually sum up to exactly 1 per unique pair.
How do I exclude empty cells when counting unique combinations?
Empty cells will be counted together as a single unique blank combination. To exclude them, you can nest the FILTER function inside your formula, like this: =ROWS(UNIQUE(FILTER(HSTACK(C:C,F:F), C:C<>''))), which removes blank rows before calculating the unique rows.




