Pivot Table Issues

Summarize Pass and Fail Results by Serial Number in Excel

John WilsonJohn Wilson Nov 18, 2026 869 views

Question details

Count how many times each unique serial number passed or failed a test.

Summarize Pass and Fail Results by Serial Number in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the test data

Click any cell in the data range, or select the full range including the Serial Number and Pass/Fail headers.

2
Insert a PivotTable

Select Insert > PivotTable, confirm the source range, and choose where to place the PivotTable.

3
Arrange the fields

In the PivotTable Fields pane, drag Serial Number to Rows and Pass/Fail to Columns.

4
Count the test records

Drag Serial Number or another field populated for every test to Values. Open Value Field Settings and select Count.

Count Pass and Fail Results with an Excel PivotTable
Update the summary: After changing the source data, right-click the PivotTable and select Refresh. If new rows are outside the original source range, update the data source first.
Summarize test results in WPS

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. 1. Open the test data: Open your Excel file in WPS Spreadsheet and select the data range, including its headers.
  2. 2. Create a PivotTable: Select Insert > PivotTable, confirm the source range, and choose a location for the summary.
  3. 3. Group the results: In the PivotTable field list, place Serial Number in Rows and Pass/Fail in Columns.
  4. 4. Set the count: Add Serial Number or another consistently populated field to Values, then use the value field settings to select Count.
Show Pass and Fail counts side by side for each serial numberOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface to organize test dataRefresh the PivotTable after updating source records
microsoft office alternative - wps office

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.