logo
search
Formula Errors

How to Fix Excel #N/A Errors with LOOKUP and Exact Matches

Partner EditorPartner Editor Sep 27, 2026 871 views

Question details

The user is experiencing #N/A errors when using the LOOKUP function to retrieve data, even when the lookup value appears to exist in the source table.

How to Fix Excel #N/A Errors with LOOKUP and Exact Matches
Product
Spreadsheets
Device & OS
not provided
Scenario
Pulling data from source tables based on a selected name using a LOOKUP formula.
Observed behavior
The formula =LOOKUP($FC$4,$R$4:$R$17,$S$4:$S$17) returns an #N/A error for certain names, despite testing different letter cases.
Before you start

Ensure your dataset does not contain invisible formatting characters or leading and trailing spaces, which frequently cause exact-match lookup formulas to fail.

Solution 1Recommended

Use VLOOKUP for Exact Matches

Switch from the approximate LOOKUP function to VLOOKUP with the FALSE argument to force an exact match.

The standard LOOKUP function defaults to an approximate match and requires the lookup vector to be sorted in ascending order. If your data is unsorted, it will often return incorrect results or #N/A errors. Using VLOOKUP allows you to specify an exact match search, which is ideal for matching specific names.

1
Select the target cell

Click on the cell containing your current LOOKUP formula that is returning the #N/A error.

2
Update to VLOOKUP formula

Replace your existing formula with a VLOOKUP formula: `=VLOOKUP($FC$4,$R$4:$S$17,2,FALSE)`. The FALSE argument guarantees that the function will only return a result for an exact name match.

3
Adjust references for filling down

If you need to drag and fill the formula down multiple rows, adjust the absolute referencing to `=VLOOKUP($FC4,$R$4:$S$17,2,FALSE)` so the row number can change dynamically while keeping the table array locked.

Use VLOOKUP for Exact Matches
Formula Breakdown: In this VLOOKUP formula, '2' represents the column index number to return from the range $R$4:$S$17, meaning it pulls data from column S.
Easy Spreadsheet Data Management

Fix #N/A Lookup Errors Easily with WPS Spreadsheet

WPS Spreadsheet provides powerful data analysis tools, including VLOOKUP, XLOOKUP, and built-in data cleaning features to quickly resolve formula #N/A errors without hassle.

  1. 1. Open your spreadsheet: Launch WPS Spreadsheet and open the file containing the lookup errors.
  2. 2. Check the error indicator: Select the cell with the #N/A error and click the Error Checking alert icon that appears next to it for context.
  3. 3. Apply the exact match formula: Replace the LOOKUP formula in the formula bar with `=VLOOKUP($FC$4,$R$4:$S$17,2,FALSE)` and press Enter.
  4. 4. Clean the source data: If the error persists, use the TRIM function or the 'Text to Columns' feature under the Data tab to eliminate hidden spaces causing the mismatch.
Fully compatible with Microsoft Excel formulas like VLOOKUP and XLOOKUPBuilt-in Error Checking tool to quickly trace formula issuesTRIM function and Text to Columns to easily clean up hidden spacesFree and lightweight alternative for complex data management
QA img-9

Frequently Asked Questions

Why does the LOOKUP function return #N/A even when the value exists?

The classic LOOKUP function expects the lookup vector to be sorted in ascending order. If it is not sorted, the formula might not find the correct value, resulting in an #N/A error. Furthermore, trailing spaces or mismatched data types can cause the lookup to fail entirely.

What is the difference between LOOKUP and VLOOKUP?

LOOKUP defaults to an approximate match and requires data to be sorted. VLOOKUP searches vertically down the first column of a table and allows you to specify whether you want an exact match (FALSE) or an approximate match (TRUE), making it much more reliable for exact text searches.

How do I fix #N/A errors if VLOOKUP still isn't working?

If VLOOKUP with the FALSE argument still returns #N/A, check for hidden spaces using the TRIM function, ensure the data types match perfectly (e.g., make sure numbers aren't formatted as text), and verify that your table array range is locked using absolute references (like $R$4:$S$17).