Function Problems

Excel Lookup with Two Criteria from Another Worksheet

Steve KSteve K Dec 2, 2026 868 views

Question details

Return a value from another worksheet by matching two criteria in separate columns.

Look Up a Value Using Two Criteria from Another Excel Worksheet
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user needs to find a row on another worksheet using two criteria and return a value from a different column.
Observed behavior
The desired result is the value from the row where both criteria match, even when the criteria are not in the first lookup column.
Before you start

Identify the cells containing your two criteria, the source worksheet's matching columns, and the column to return. The examples use A2 and C2 as criteria, source columns A and C for matching, and source column B for the result.

Solution 1Recommended

Use INDEX and MATCH to Find a Row with Two Criteria

Use this approach to match two separate columns without combining their values into a single lookup key.

1
Select the result cell

On the worksheet containing your criteria, click the cell where you want the returned value.

2
Enter the formula

Enter =INDEX('FY2122 Split Gifts'!$B$2:$B$5,MATCH(1,('FY2122 Split Gifts'!$A$2:$A$5=A2)*('FY2122 Split Gifts'!$C$2:$C$5=C2),0)). Replace the sheet name and ranges with your own, keeping all source ranges the same size.

3
Confirm the formula

Press Enter in current Excel versions. In older Excel versions on Windows, confirm the array formula with Ctrl+Shift+Enter instead.

Use INDEX and MATCH to Find a Row with Two Criteria
Matching results: The formula returns the first row matching both criteria. If no row matches, it returns #N/A.
Two-criteria lookup in WPS

Match Two Worksheet Criteria in WPS Spreadsheet

In WPS Spreadsheet, create a helper key and return column on the source sheet, then use VLOOKUP to find the row matching both criteria.

  1. 1. Open the workbook: Open your workbook in WPS Spreadsheet and select the source worksheet. In this example, source columns A and C contain the criteria, and column B contains the values to return.
  2. 2. Create helper columns: In unused column D, enter =LEN(A2)&":"&A2&LEN(C2)&":"&C2 in D2. In unused column E, enter =B2 in E2. Fill both formulas down through row 5, or through the last source row.
  3. 3. Enter the lookup: On the criteria worksheet, select the result cell and enter =VLOOKUP(LEN(A2)&":"&A2&LEN(C2)&":"&C2,'FY2122 Split Gifts'!$D$2:$E$5,2,FALSE). Change the sheet name and ranges to match your workbook.
  4. 4. Check the result: Press Enter and verify the returned value against the source row. If the result is #N/A, check that both criteria match the source values.
Match two criteria from another worksheet using VLOOKUP.Open and save Microsoft Excel XLSX files.Use a familiar spreadsheet interface for formulas and worksheets.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the lookup return #N/A?

No source row may match both criteria. Check the values in A2 and C2 against the source columns, including extra spaces and differences between numbers and text.

What happens if more than one row matches both criteria?

The INDEX and MATCH and VLOOKUP examples return the value from the first matching row in the specified source ranges.

Do the matching columns have to be next to each other?

No. The formulas can reference separate columns, such as A and C. Make sure the matching and return ranges cover the same rows.

Why is the worksheet name enclosed in single quotes?

The name 'FY2122 Split Gifts' contains spaces, so it must be enclosed in single quotes before the exclamation mark in the formula.