Summarize Pass and Fail Results by Serial Number in Excel
Question details
Count how many times each unique serial number passed or failed a test.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains repeated serial numbers and a Pass or Fail result for each test.
- Observed behavior
- The desired summary shows one row per serial number with separate counts for Pass and Fail results.
Arrange the source data with one test per row and column headers such as Serial Number and Pass/Fail. Check that results use consistent labels and that the field you plan to count is populated for every test.
Count Pass and Fail Results with an Excel PivotTable
Use a PivotTable to group test results by serial number and show separate counts for each outcome.
Click any cell in the data range, or select the full range including the Serial Number and Pass/Fail headers.
Select Insert > PivotTable, confirm the source range, and choose where to place the PivotTable.
In the PivotTable Fields pane, drag Serial Number to Rows and Pass/Fail to Columns.
Drag Serial Number or another field populated for every test to Values. Open Value Field Settings and select Count.

Count Pass and Fail Tests with WPS Spreadsheet
Create a PivotTable in WPS Spreadsheet to group test records by serial number and count each result.
- 1. Open the test data: Open your Excel file in WPS Spreadsheet and select the data range, including its headers.
- 2. Create a PivotTable: Select Insert > PivotTable, confirm the source range, and choose a location for the summary.
- 3. Group the results: In the PivotTable field list, place Serial Number in Rows and Pass/Fail in Columns.
- 4. Set the count: Add Serial Number or another consistently populated field to Values, then use the value field settings to select Count.

Frequently Asked Questions
Why does the PivotTable show a sum instead of a count?
Excel may sum numeric fields by default. In the Values area, open Value Field Settings for the field and select Count.
Why do I see separate columns for similar Pass or Fail labels?
Inconsistent labels, such as extra spaces or different wording, can create separate categories. Correct the labels in the source data, then right-click the PivotTable and select Refresh.
How do I include new test rows in the PivotTable?
If the new rows are within the PivotTable source, right-click the PivotTable and select Refresh. If they are outside it, select the PivotTable and use PivotTable Analyze > Change Data Source to expand the range, then refresh.
Can I count a field other than Serial Number?
Yes. Drag another field to Values and set its calculation to Count, provided it is populated for every test record. Blank cells in that field will not be counted.




