Look up a SKU in a price table and show Not in catalog instead of #N/A
公式
=IFERROR(VLOOKUP(E2, A:C, 3, FALSE), "Not in catalog")
说明
IFERROR catches #N/A from a missed exact VLOOKUP and any other lookup error. Prefer it over IF(ISNA(…)) for shorter formulas.
步骤
- Run the VLOOKUP as usual with FALSE for exact match.
- Wrap it in IFERROR.
- The second argument is the fallback text or blank.
变体
Fallback to a second table
Tries the live list, then an archive sheet.
=IFERROR(VLOOKUP(E2, Prices!A:C, 3, FALSE), VLOOKUP(E2, Archive!A:C, 3, FALSE))
XLOOKUP built-in if_not_found
No IFERROR needed. Match mode 0 is exact.
=XLOOKUP(E2, A:A, C:C, "Not in catalog", 0)
Blank if missing
Keeps dashboards clean when many keys are still empty.
=IFERROR(VLOOKUP(E2, A:C, 3, FALSE), "")