Function Problems

Check Whether Two Values Occur in the Same Excel Table Row

Ayan MasoodAyan Masood Nov 12, 2026 870 views

Question details

Create a summary that identifies whether each person completed each training, course, or equipment item listed in a normalized Excel table.

Check Whether Two Values Occur in the Same Excel Table Row
Product
Microsoft Excel
Device & OS
not provided
Scenario
The source table contains one record per completed training, with columns such as Name and Completed Training. The user wants a person-by-training Yes or No matrix.
Observed behavior
The required result is Yes when a matching name and training combination exists in the source table, and No when no matching record exists.
Before you start

Confirm that the source data has separate columns for the person name and the completed training or equipment value. Ensure the names and training headers in the summary use the same spelling as the source data.

Solution 1Recommended

Use COUNTIFS to test each person and training combination

Use this method when you need a formula-driven Yes or No summary grid that updates as matching records are added to the source table.

COUNTIFS counts records that meet both criteria at the same time: the person in the row header and the training in the column header. A count above zero means that combination occurs in the normalized source data.

1
Create the summary headers

In a blank area or worksheet, place each person in the first column, such as A2:A10, and place each training or equipment item across the top row, such as B1:F1.

2
Enter the COUNTIFS formula

In the first result cell, such as B2, enter =COUNTIFS(Table1[Name],$A2,Table1[Completed Training],B$1). Replace Table1, Name, and Completed Training with your actual table and column names if they differ.

3
Return Yes or No

To display text instead of a count, use =IF(COUNTIFS(Table1[Name],$A2,Table1[Completed Training],B$1)>0,"Yes","No") in the first result cell.

4
Fill the formula across the matrix

Select the formula cell and drag the fill handle across the training columns and down the person rows. The $A2 and B$1 references keep the correct row and column headers.

Use COUNTIFS to test each person and training combination
Matching records are identified: Any count greater than 0 confirms that the person and training values occur together in at least one source-table record.
Work with training completion data in WPS Spreadsheets

Build a Person-by-Training Completion Matrix in WPS Spreadsheets

WPS Spreadsheets can use COUNTIFS to check whether a name and training item appear together in your source data, then return a clear Yes or No result. You can also summarize the same normalized records with a PivotTable.

  1. 1. Set up row and column headers: In WPS Spreadsheets, enter person names down the first summary column and training names across the first summary row.
  2. 2. Enter the match formula: Select the first matrix cell and enter =IF(COUNTIFS(NameRange,$A2,TrainingRange,B$1)>0,"Yes","No"), replacing NameRange and TrainingRange with the appropriate source columns.
  3. 3. Fill the matrix: Use the fill handle in the lower-right corner of the formula cell to copy the formula across all training columns and down all person rows.
  4. 4. Review completion status: Read Yes as a matching completion record and No as no matching record for that person-training combination.
Use COUNTIFS to identify matching person and training recordsCreate a Yes or No completion matrix with relative and absolute cell referencesBuild PivotTables to count training completions by personOpen and edit Microsoft Excel .xlsx and .xls files with compatible spreadsheet workflows
QA img-9

Frequently Asked Questions

Why does COUNTIFS need two criteria ranges?

COUNTIFS evaluates each criteria range on the same source record. One range checks the person name, while the other checks the completed training value, so the result only counts records where both conditions match.

How can I show Yes or No instead of a COUNTIFS result?

Wrap the formula in IF: =IF(COUNTIFS(Table1[Name],$A2,Table1[Completed Training],B$1)>0,"Yes","No"). The formula returns Yes for any count greater than zero.

Can COUNTIFS find multiple completions of the same training?

Yes. COUNTIFS returns the number of matching records. Use the count directly if repeat completions matter, or use >0 inside IF when you only need a Yes or No status.

What should I do if the formula returns No for a known completion?

Check that the person name and training header exactly match the source values, including spaces. Also verify that the formula references the correct table columns and that the summary headers are not blank.

Is a PivotTable better than COUNTIFS for training completion data?

Use COUNTIFS for a customizable formula-based Yes or No grid. Use Insert > PivotTable when you need a fast interactive summary that displays completion counts by Name and Completed Training.