logo
search
Function Problems

How to Match Two Excel Columns and Return TRUE or FALSE

Algirdas JasaitisAlgirdas Jasaitis Oct 8, 2026 869 views

Question details

The user needs to verify if a specific combination of two values, such as an App ID and an email address, appears together in a secondary dataset.

How to Match Two Excel Columns and Return TRUE or FALSE
Product
Excel
Device & OS
not provided
Scenario
Cross-referencing two datasets to check for the simultaneous occurrence of paired data points in corresponding rows.
Observed behavior
A formula returns TRUE when both values exist together in the target dataset (handling duplicates gracefully) and FALSE when they do not.
Before you start

Make sure your secondary dataset is properly organized in columns and that you have identified the exact column letters (e.g., Columns E and F) you want to search.

Solution 1Recommended

Use the COUNTIFS Formula to Find Matching Pairs

By utilizing the COUNTIFS function, you can evaluate multiple criteria across different columns to return an exact TRUE or FALSE boolean match.

The COUNTIFS function is ideal for this scenario because it counts the number of times multiple conditions are met simultaneously. By appending >0 to the formula, Excel automatically converts any numerical count (1 or greater) into a TRUE statement.

1
Select the result cell

Click on the cell where you want the TRUE or FALSE result to display (for example, cell C3 next to your first dataset).

2
Enter the COUNTIFS formula

Type the formula =COUNTIFS($E:$E, A3, $F:$F, B3)>0 into the formula bar. Replace $E:$E and $F:$F with the target columns from your second dataset, and A3 and B3 with the cells containing your lookup values.

3
Apply to the entire column

Press Enter to see the result for the first row. Then, click the small square at the bottom-right corner of cell C3 and drag it down to fill the formula for the remaining rows.

Use the COUNTIFS Formula to Find Matching Pairs
Handling Duplicates: Because the formula checks if the count is greater than zero, it will safely return TRUE even if the App ID and email combination appears multiple times in the second dataset.
WPS Spreadsheet Solution

Match Multiple Columns Effortlessly with WPS Spreadsheet

WPS Spreadsheet provides robust support for advanced data analysis and formulas like COUNTIFS. You can easily compare extensive datasets and perform complex validations without lag.

  1. 1. Open your datasets: Launch WPS Spreadsheet and open the file containing the datasets you want to compare.
  2. 2. Input the formula: Select your output cell and type =COUNTIFS($E:$E, A3, $F:$F, B3)>0 to set up the multi-criteria check.
  3. 3. Fill the results: Press Enter, then double-click the fill handle in the bottom-right corner of the cell to instantly apply the TRUE/FALSE logic to your entire list.
Fully compatible with Microsoft Excel formulas, ensuring your COUNTIFS functions work seamlessly.Lightweight architecture allows for fast calculations across large datasets without freezing.Intuitive Function Wizard helps you build multi-criteria formulas step-by-step.
microsoft office alternative - wps office

Frequently Asked Questions

Can I return 'Match' or 'No Match' instead of TRUE or FALSE?

Yes, you can wrap the existing formula inside an IF statement. Use =IF(COUNTIFS($E:$E, A3, $F:$F, B3)>0, "Match", "No Match") to display custom text based on the result.

Why does the formula return FALSE when I know the data is there?

This commonly happens due to hidden trailing spaces or mismatched data formats (like text vs. numbers). Try using the TRIM function on your data to remove invisible spaces, or ensure both columns are formatted identically.

Does this formula work across different worksheets?

Yes. If your second dataset is on another sheet named 'Sheet2', you can adjust the references like this: =COUNTIFS(Sheet2!$E:$E, A3, Sheet2!$F:$F, B3)>0.