Function Problems

Match Two Columns Between Excel Sheets and Return a Value

Tauseeq MagsiTauseeq Magsi Nov 10, 2026 869 views

Question details

The user needs a method to match records using two distinct criteria from one worksheet against two columns in another worksheet, and then return the corresponding value from a third column.

Match Two Columns Between Excel Sheets to Return a Value
Product
Excel
Device & OS
not provided
Scenario
Looking up and returning specific data across multiple sheets when a single-criteria VLOOKUP is insufficient to uniquely identify the row.
Observed behavior
The user requires an alternative formula to evaluate two conditions simultaneously across different columns before retrieving the target value.
Before you start

Ensure both worksheets are open and clearly identify the exact column letters containing your two criteria and the values you wish to return.

Solution 1Recommended

Use the XLOOKUP Function (Recommended for Newer Versions)

XLOOKUP allows you to easily combine multiple criteria using the ampersand (&) operator without needing complex array formulas.

If you are using a modern spreadsheet application, XLOOKUP is the most efficient way to match multiple criteria. By concatenating your lookup values and your lookup arrays, you can evaluate two or more columns simultaneously.

1
Select the destination cell

Click on the cell in Spreadsheet 1 where you want the returned value to appear (e.g., C2).

2
Enter the XLOOKUP formula

Type the formula: =XLOOKUP(A2&B2,'Spreadsheet 2'!$A$2:$A$1000&'Spreadsheet 2'!$B$2:$B$1000,'Spreadsheet 2'!$C$2:$C$1000,"")

3
Apply and drag

Press Enter to apply the formula. You can then click and drag the fill handle down to apply this logic to the remaining rows in your column.

Use the XLOOKUP Function (Recommended for Newer Versions)
Version Compatibility: XLOOKUP is natively supported in Microsoft 365, Excel 2021, and recent versions of WPS Office Spreadsheet.
Advanced Formulas in WPS

Match Data Across Sheets Effortlessly in WPS Spreadsheet

WPS Spreadsheet fully supports advanced lookup functions, including XLOOKUP and complex array-based INDEX/MATCH combinations, allowing you to cross-reference data accurately and efficiently.

  1. 1. Open your workbook in WPS: Launch WPS Spreadsheet and open the file containing your multiple worksheets.
  2. 2. Navigate to the return cell: Select the empty cell where you want the matched data to be displayed.
  3. 3. Enter the formula: Type in your XLOOKUP or INDEX/MATCH formula exactly as you would in standard Excel.
  4. 4. Retrieve the data: Press Enter to instantly fetch the corresponding value from your second sheet.
Fully compatible with Microsoft Excel formula syntax (.xlsx)Natively supports advanced dynamic arrays and the XLOOKUP functionLightweight application with high performance for large datasetsFree to download with a familiar, easy-to-navigate user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does my INDEX and MATCH formula return a #VALUE! error?

This usually happens in older spreadsheet versions if you don't evaluate the function as an array formula. Try double-clicking the cell and pressing Ctrl+Shift+Enter instead of just Enter. Additionally, verify that your lookup array ranges (like A2:A1000 and B2:B1000) are exactly the same size.

Can I use standard VLOOKUP to match two columns?

Standard VLOOKUP only supports a single lookup value. To use VLOOKUP for multiple criteria, you must create a new 'helper column' in your source data that concatenates the two criteria (e.g., =A2&B2), and then use that combined column as your primary lookup value.

How do I handle #N/A errors when a match isn't found?

If using INDEX and MATCH, wrap your entire formula in the IFERROR function, like =IFERROR(your_formula, "Not Found"). If you are using XLOOKUP, it handles this natively through its built-in 'if_not_found' argument, which is the fourth parameter in the formula.