Formula Errors

Fix Excel IF and Lookup Formulas That Miss Multiple Criteria

Nimra MalikNimra Malik Dec 2, 2026 868 views

Question details

The user needs an Excel formula to return results when several lookup criteria match.

Fix Excel IF and Lookup Formulas That Miss Multiple Criteria
Product
Microsoft Excel
Device & OS
not provided
Scenario
A formula compares fields such as Banding, Pressure, Tier, and Material against a reference table.
Observed behavior
The formula does not return results for all expected criteria combinations.
Before you start

Identify the criteria columns and the result column in both tables. Check that each expected combination exists in the reference table and that corresponding values use consistent data types and spacing.

Solution 1Recommended

Use a helper key for the Excel multi-criteria lookup

Combine the criteria in each table, then look up the resulting key to find the matching row.

The examples assume Banding, Pressure, Tier, and Material are in columns A through D on both sheets, the reference table is on Sheet2, and its result is in column E. Adjust the columns and row limits to match your workbook.

1
Standardize the criteria

Compare the source and Sheet2 criteria columns. Remove extra spaces, use consistent text or number types, and preserve leading zeros where they are significant. Use Excel's Find and Replace or a helper formula such as =TRIM(A2) to clean text.

2
Create matching helper keys

In G2 on both sheets, enter =UPPER(TRIM(A2)&"|"&TRIM(B2)&"|"&TRIM(C2)&"|"&TRIM(D2)) and fill it down. Use the same field order on both sheets and a separator that does not appear in the criteria.

3
Look up the combined key

In the source table's result cell, enter =XLOOKUP(G2,Sheet2!$G$2:$G$100,Sheet2!$E$2:$E$100,"No match") and fill the formula down. Expand the ranges if the reference table extends beyond row 100.

4
Check unmatched rows

For a row showing "No match," compare its G-column key with the corresponding keys on Sheet2. Check for missing combinations, nonbreaking spaces, and numbers stored as text.

Use a helper key for the Excel multi-criteria lookup
If XLOOKUP is unavailable: Use =INDEX(Sheet2!$E$2:$E$100,MATCH(G2,Sheet2!$G$2:$G$100,0)) instead. Both formulas return the first matching row when the reference table contains duplicate keys.
Work with formulas in WPS Spreadsheets

Build a multi-criteria lookup in WPS Spreadsheets

Open your workbook in WPS Spreadsheets, create matching helper keys, and use INDEX and MATCH to return the result for each criteria combination.

  1. 1. Open the workbook: In WPS Spreadsheets, use Open to select your Excel workbook and identify the source and reference sheets.
  2. 2. Clean the criteria: Compare the criteria columns on both sheets, remove extra spaces, and make sure corresponding values use consistent text or number types.
  3. 3. Add helper keys: If the four criteria are in columns A through D, enter =UPPER(TRIM(A2)&"|"&TRIM(B2)&"|"&TRIM(C2)&"|"&TRIM(D2)) in G2 on both sheets and fill down. Adjust the columns to match your workbook.
  4. 4. Return the match: In the source result cell, enter =INDEX(Sheet2!$E$2:$E$100,MATCH(G2,Sheet2!$G$2:$G$100,0)) and fill down. Adjust Sheet2 and the ranges to match your reference table.
Combine multiple criteria into a searchable helper keyUse INDEX and MATCH to find a matching reference rowOpen and edit Microsoft Excel XLSX and XLS filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does my formula miss a row that looks like a match?

Extra spaces, nonbreaking spaces, or a number stored as text can make values differ. Compare the helper keys in both tables and clean the underlying criteria before looking them up again.

Can I use INDEX and MATCH instead of XLOOKUP?

Yes. With the lookup key in G2, reference keys in Sheet2 column G, and results in Sheet2 column E, use =INDEX(Sheet2!$E$2:$E$100,MATCH(G2,Sheet2!$G$2:$G$100,0)). Adjust the ranges to fit your data.

Why should I put separators between the criteria?

Separators distinguish combinations such as 1 and 23 from 12 and 3. Choose a separator that does not occur in the criteria values, and use it consistently in both helper-key formulas.

What happens if the reference table has duplicate criteria combinations?

XLOOKUP and INDEX with MATCH return the first matching row in the specified range. Check the reference helper-key column for duplicates if each combination should have only one result.