How to Match Two Excel Columns and Return TRUE or FALSE
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.

- 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.
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.
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.
Click on the cell where you want the TRUE or FALSE result to display (for example, cell C3 next to your first dataset).
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.
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.

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. Open your datasets: Launch WPS Spreadsheet and open the file containing the datasets you want to compare.
- 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. 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.

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.




