How to Compare Two Cell Matches and Return Match or No Match in Excel
Question details
The user wants to compare two specific cells (e.g., A2 and E2) against corresponding values in two separate columns (e.g., K and J) and return a "Match" or "No match" text result based on whether both conditions are satisfied.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Performing multi-condition data comparison and validation across different columns without relying on volatile functions.
- Observed behavior
- The user requires a reliable array formula to output "Match" or "No match" for dual conditions, avoiding performance-heavy functions like OFFSET or INDIRECT.
Ensure your data ranges are consistent in length (e.g., both covering rows 2 through 30) before applying array formulas, as mismatched array sizes will result in calculation errors.
Use a Non-Volatile Combination of INDEX and MATCH
Apply an advanced array formula utilizing INDEX, MATCH, ROW, and IF to check two conditions across ranges without triggering constant recalculations.
Volatile functions like OFFSET and INDIRECT recalculate every time any change is made to the worksheet, which can drastically slow down your workbook's performance. Using an array combination of INDEX and MATCH is a much more efficient way to perform a two-condition look-up.
Click on the cell where you want the "Match" or "No match" result to appear.
Type the following formula into the formula bar: =IF(ISNUMBER(MATCH(TRUE,(ROW($A$2:$A$30)-ROW($A$2)+1)/(A2=$K$2:$K$30)=(ROW($A$2:$A$30)-ROW($A$2)+1)/(INDEX($J$2:$J$30,(ROW($A$2:$A$30)+1-ROW($A$2))/(A2=$K$2:$K$30))=E2),0)),"Match","No match")
Press Enter to calculate the result. If you are using an older version of Excel, you may need to press Ctrl+Shift+Enter to correctly evaluate the array formula.

Use the COUNTIFS Function for Multi-Condition Matching
A simpler alternative using the COUNTIFS function to check if both conditions exist in the same row within your target columns.
Easily Compare Data and Apply Complex Formulas in WPS Spreadsheet
WPS Spreadsheet offers full support for advanced array formulas, INDEX/MATCH combinations, and COUNTIFS, allowing you to validate and compare large datasets effortlessly without performance drops.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing the data you need to compare.
- 2. Input the comparison formula: Select an empty cell and type in your preferred multi-condition formula, such as the IF and COUNTIFS combination.
- 3. Calculate instantly: Press Enter to execute. WPS Spreadsheet calculates non-volatile array functions instantly with perfect accuracy.

Frequently Asked Questions
Why should I avoid volatile functions like OFFSET and INDIRECT?
Volatile functions recalculate every time any change is made anywhere in the workbook. In files with thousands of rows, this constant recalculation can significantly slow down performance and cause input lag.
Can I compare more than two matches with these formulas?
Yes. If you are using the COUNTIFS method, you can easily expand it by adding more criteria ranges and criteria pairs (e.g., adding Range3, Criteria3). For INDEX/MATCH arrays, you would need to nest additional logical conditions using multiplication (*) for AND logic.
Why does my array formula show an error or incorrect result?
Array formulas often require you to press Ctrl+Shift+Enter instead of just Enter in older spreadsheet versions. Additionally, ensure that your referenced ranges (like K2:K30 and J2:J30) are exactly the same size; otherwise, the formula will return an #N/A or #VALUE! error.




