Formula guide · Excel and Google Sheets · Updated May 13, 2026

How to Fix #N/A in Excel and Google Sheets

Fix #N/A errors in lookup formulas by checking missing matches, spaces, data types, and exact-match settings.

Quick Answer

#N/A usually means the lookup value was not found or the two compared values are not truly identical.

Copyable Formula

=XLOOKUP(TRIM(E2),TRIM(A2:A8),C2:C8,"Not found")

Syntax

=IFERROR(XLOOKUP(E2,A2:A8,C2:C8),"Not found")

Excel and Google Sheets

Worked Example

ProblemFix
Extra spacesUse TRIM
Number stored as textConvert data type
Missing keyReturn Not found

Result: The fix depends on whether the match is missing or merely formatted differently.

Steps

  • Check whether the lookup value exists in the lookup range.
  • Compare cleaned versions of both values.
  • Add a fallback message once the source issue is understood.

Common Mistakes

  • Using IFERROR to hide a data quality problem too early.
  • Not checking hidden spaces or text-number mismatches.
  • Using approximate matching by accident in VLOOKUP.

Excel vs Google Sheets Notes

The core idea works in both Excel and Google Sheets, but separators, function availability, and array behavior can vary by account, locale, and version.

Editorial check: This guide was last updated May 13, 2026. Formula behavior can vary by Excel version, Google Sheets rollout, and spreadsheet locale.

FAQ