What you will fix
A VLOOKUP can return a value even when the lookup key is not present if its fourth argument allows approximate matching. In this practice sheet, P03 is not in the SKU list, yet =VLOOKUP(D2,A2:B4,2,TRUE) returns 35 because it falls back to the preceding approximate match. You will replace that behavior with exact matching.
Learning objectives
Open the practice workbook
Practice in your own copy
Make your own Google Sheets copy with the same data, formulas, formatting, filter and frozen header. The original remains unchanged.
Sign in to Google. If the original is not publicly shared, download the full workbook and import it into Google Sheets, or paste the example data into your own sheet.
Sample data
| SKU | Price |
|---|---|
| P01 | 12 |
| P02 | 35 |
| P10 | 80 |
The lookup table is A2:B4. P03 is intentionally absent so you can reproduce the wrong-match symptom.
| Lookup cell | Starting key | Result cell |
|---|---|---|
| D2 | P02 | E2 |
You will temporarily change D2 during diagnosis, then restore P02.
Why the wrong result happens
Step 1: Change D2 to P03, a SKU that does not exist in A2:A4. Enter =VLOOKUP(D2,A2:B4,2,TRUE) in E2. In the verified workbook, E2 returns 35 even though P03 is missing.
=VLOOKUP(D2,A2:B4,2,TRUE)Fix the lookup with an exact match
Step 2: Keep D2 as P03 and replace TRUE with FALSE. The formula becomes =VLOOKUP(D2,A2:B4,2,FALSE). Because P03 is not present, the verified result is #N/A instead of a misleading price.
=VLOOKUP(D2,A2:B4,2,FALSE)Step 3: Restore D2 to P02. Keep the exact-match formula in E2. The verified result returns to 35.
Recalculation check: temporarily change D2 from P02 to P10. E2 should update from 35 to 80. Restore D2 to P02 and confirm E2 returns to 35.
Checkpoint
| Lookup SKU | Formula | Expected result |
|---|---|---|
| P02 | =VLOOKUP(D2,A2:B4,2,FALSE) | 35 |
| P10 | =VLOOKUP(D2,A2:B4,2,FALSE) | 80 |
| P03 | =VLOOKUP(D2,A2:B4,2,FALSE) | #N/A |
These three cases distinguish exact-match behavior from the misleading approximate match.
Common mistakes and fixes
If FALSE returns #N/A for a key you believe exists, compare the key exactly: leading/trailing spaces, text-versus-number differences, or a lookup range that starts in the wrong column can all prevent an exact match. Do not “fix” #N/A by switching back to TRUE.
Independent practice
Add a temporary SKU P05 with price 50, test it with FALSE, then remove the row. Also try a missing SKU and confirm the exact-match formula returns #N/A rather than another item’s price.
Key takeaways
- ✓TRUE enables approximate matching; it is not appropriate for ordinary exact-ID lookups.
- ✓A missing key can produce a believable but wrong value under approximate matching.
- ✓FALSE requires an exact match and returns #N/A when the key is absent.
- ✓For this sample, P02 returns 35 and P10 returns 80 with the exact formula.
- ✓Test a changed lookup key, then restore the original sample to confirm the formula is live.
Check your understanding
Answer four questions about the practice sheet.
Next lesson
Continue with missing-value handling in XLOOKUP, where you can also control the not-found result directly.
Comments
No comments yet. Be the first to join the discussion.