Formula Errors

Create a Reusable Excel Formula for Repeated Names and Pass or Fail Results

Jason MillerJason Miller Nov 20, 2026 870 views

Question details

Create a formula that summarizes Pass or Fail results for repeated names without manually changing row references.

Create a Reusable Excel Formula for Repeated Names and Pass or Fail Results
Product
Microsoft Excel
Device & OS
not provided
Scenario
Names are listed in column A, individual results are in column L, and a summary is needed in column M.
Observed behavior
The first occurrence of each name should show Pass if all its results are Pass, Fail if any result is Fail, or a blank if the results are incomplete. Later occurrences should remain blank.
Before you start

Check that names are in column A, results are in column L, and row 1 contains headers. The formula below evaluates rows 2 through 1000; extend both fixed ranges if your data goes beyond row 1000.

Solution 1Recommended

Use COUNTIF and COUNTIFS to summarize each name

Use this formula when you want one result per name, with Fail taking priority and incomplete results left blank.

The formula checks all rows for each name, so matching rows do not need to be consecutive. It ignores empty names and leaves later occurrences blank.

A result is Pass only when every matching row contains Pass. If no matching row contains Fail but one or more results are blank or contain another value, the summary remains blank.

1
Enter the formula

Select cell M2 and enter =IF(A2="","",IF(COUNTIF($A$2:A2,A2)>1,"",IF(COUNTIFS($A$2:$A$1000,A2,$L$2:$L$1000,"Fail")>0,"Fail",IF(COUNTIFS($A$2:$A$1000,A2,$L$2:$L$1000,"Pass")=COUNTIF($A$2:$A$1000,A2),"Pass","")))).

2
Copy the formula down

Select M2 and drag the fill handle down column M through the last data row. The relative reference A2 adjusts automatically for each row.

3
Check the results

Review the first row for a repeated name in column M. It should show Fail if any matching result is Fail, Pass if all matching results are Pass, and otherwise appear blank.

Use COUNTIF and COUNTIFS to summarize each name
Formula blanks and ISBLANK: The formula returns an empty string ("") for a blank-looking result. ISBLANK on that result cell returns FALSE because the cell contains a formula; use a comparison such as M2="" to test its displayed blank value.
Work with formulas in WPS Spreadsheets

Summarize repeated names in WPS Spreadsheets

Use the same COUNTIF and COUNTIFS formula in WPS Spreadsheets to display one Pass or Fail summary per name and fill it down automatically.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use Open to select your workbook. Confirm that names are in column A and results are in column L.
  2. 2. Enter the formula: Select M2 and enter =IF(A2="","",IF(COUNTIF($A$2:A2,A2)>1,"",IF(COUNTIFS($A$2:$A$1000,A2,$L$2:$L$1000,"Fail")>0,"Fail",IF(COUNTIFS($A$2:$A$1000,A2,$L$2:$L$1000,"Pass")=COUNTIF($A$2:$A$1000,A2),"Pass","")))).
  3. 3. Fill down and review: Drag the fill handle from M2 down to the last data row, then check the first occurrence of each name for its summary.
  4. 4. Save the workbook: Use File > Save As to save the updated spreadsheet in XLSX format.
Summarize repeated names without editing row references manuallyOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet formulas and fill controlsWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the first occurrence of a name show a blank?

If none of that name's results in column L is Fail but at least one is blank or is not Pass, the formula returns an empty string. Check all matching rows in column L.

What happens if a name has both Pass and Fail results?

The first occurrence shows Fail because the COUNTIFS check for Fail takes priority over the check for all Pass results.

Can I use the formula for more than 1,000 rows?

Yes. In M2, change every $A$2:$A$1000 and $L$2:$L$1000 reference to the same larger ending row, then fill the revised formula down column M.

Why doesn't ISBLANK recognize a blank-looking summary cell?

A cell containing a formula is not empty, even when the formula returns "". Use a test such as =M2="" to check for an empty string.