Fix Excel IF and Lookup Formulas That Miss Multiple Criteria
Question details
The user needs an Excel formula to return results when several lookup criteria match.

- 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.
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.
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.
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.
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.
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.
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.

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. Open the workbook: In WPS Spreadsheets, use Open to select your Excel workbook and identify the source and reference sheets.
- 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. 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. 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.

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.




