A lookup such as VLOOKUP or XLOOKUP returns an error when the key matches no row, and a common cause is a typo, a trailing space or a different format. Listing every unmatched key before you use the result stops those errors from spreading into totals and reports.
Checked on 2026-11-29. We did not run any tool for this guide. Every result below is an expected result, marked UNTESTED, for you to confirm on your own files.
Prerequisites
- Two tables joined by a lookup, such as orders and prices
- The lookup formula in the sheet
- The key column in both tables
Steps
1. Run the lookup on all rows
Fill the lookup down the whole column so every row has a result or an error.
Expected result: Every row has a result or an error shown.
2. List the errors
Filter for the error values and write down each unmatched key.
Expected result: Unmatched keys are listed, or none exist.
3. Find why each key misses
Check each unmatched key against the source table for a typo, a space or a format difference.
Expected result: Each miss has a cause named: typo, space or format.
4. Fix the keys and re-run
Fix the keys, re-run the lookup and confirm no errors remain.
Expected result: The lookup returns a value for every row.
Worked example
A practice price lookup has four order keys. One misses because of a trailing space.
| Order key | Lookup result | Match? |
|---|---|---|
| ORD-1041 | 42.50 | Yes |
| ORD-1042 | 18.75 | Yes |
| ORD-1043 | Error | No |
| ORD-1044 | 24.00 | Yes |
Expected result: Three keys match and ORD-1043 misses because of a trailing space, so the space is removed and the lookup returns 24.00 (UNTESTED – confirm it yourself.)
Verdict table
| Check | Expected result | Pass? |
|---|---|---|
| Run the lookup on all rows | Every row has a result or an error shown. | – |
| List the errors | Unmatched keys are listed, or none exist. | – |
| Find why each key misses | Each miss has a cause named: typo, space or format. | – |
| Fix the keys and re-run | The lookup returns a value for every row. | – |
Limits
- A lookup can match the wrong row when keys repeat; check the key is unique first.
- Text and numbers that look the same are different keys; check the cell type.
Sources
- How to Use AI in Excel and Google Sheets – checked 2026-11-29
- How to Use AI to Create Spreadsheet Formulas in Excel and Google Sheets – checked 2026-11-29
