logo
search
Excel Error Codes

How to Fix Excel VLOOKUP and INDEX MATCH #N/A Errors

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user is encountering a #N/A or 'Not Found' error when using lookup formulas (like VLOOKUP and INDEX MATCH) for specific text values, such as 1/2 bbl and 1/4 bbl, despite the formulas appearing to be correct.

Product
Microsoft Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Pulling data using VLOOKUP or INDEX MATCH for specific text strings or package types.
Observed behavior
The formulas return an #N/A error because the lookup value does not perfectly match the source value.
Before you start

Check that the lookup range in your formula is absolute (e.g., $A$2:$C$100) to prevent the reference from shifting if you copied the formula down.

Solution 1Recommended

Remove Extra Spaces and Non-Printable Characters

Use the TRIM and CLEAN functions to remove unseen spaces or characters that prevent an exact match.

Hidden characters, leading spaces, or trailing spaces in either the lookup value or the source data array will cause VLOOKUP and INDEX MATCH to fail to find an exact match.

1
Insert a helper column

Right-click the column letter next to your lookup values and select 'Insert' to create a new helper column.

2
Apply TRIM and CLEAN

Type the formula =TRIM(CLEAN(A2)) (assuming A2 contains your original lookup value) and press Enter.

3
Copy the formula down

Double-click the fill handle in the bottom-right corner of the cell to apply this formula to the rest of the column.

4
Paste as values

Select the newly cleaned data, press Ctrl+C to copy, right-click the original column, and select 'Paste as Values' to overwrite the unformatted text.

Data Consistency: Trailing spaces are one of the most common causes for the #N/A error in exact-match VLOOKUP formulas. Always ensure both your lookup list and source list are cleaned.
Fix Spreadsheet Errors Efficiently

Troubleshoot Formula Errors Easily with WPS Spreadsheet

WPS Spreadsheet provides powerful data cleaning tools and formula error-checking features to help you resolve #N/A errors quickly. Best of all, it handles standard Excel formulas seamlessly.

  1. 1. Open the workbook: Launch WPS Spreadsheet and open the file containing the #N/A errors.
  2. 2. Check the error details: Click the warning icon next to the cell containing the #N/A error to read the specific error details.
  3. 3. Clean your data: Navigate to the 'Data' tab and use the 'Text to Columns' feature to convert hidden formatting, or apply the TRIM function.
  4. 4. Re-enter the formula: Type your VLOOKUP or INDEX MATCH formula again, utilizing the formula auto-complete prompts to ensure perfect syntax.
Fully compatible with Microsoft Excel formulas including VLOOKUP and INDEX MATCHBuilt-in error checking and tracing tools to identify mismatched dataOne-click text-to-columns and formatting tools to clean lookup values effortlessly
microsoft office alternative - wps office

Frequently Asked Questions

Why does VLOOKUP return #N/A when the value is clearly there?

This usually happens because of hidden spaces, non-printable characters, or inconsistent formatting (like text vs. numbers) between the lookup value and the source data. Even a single invisible trailing space will cause the formula to fail.

How do I force VLOOKUP to find an exact match?

Ensure the fourth argument (range_lookup) in your VLOOKUP formula is set to FALSE or 0. For example: =VLOOKUP(A2, D2:F100, 2, FALSE). If you leave this argument blank, Excel defaults to TRUE, which attempts an approximate match.

What does the #N/A error mean in Excel?

#N/A stands for 'Not Available'. It signifies that the formula cannot find the exact lookup value you requested within the specified source range.

Can I replace the #N/A error with a blank cell or custom text?

Yes, you can hide the error by wrapping your lookup formula in the IFERROR function. For example, use =IFERROR(VLOOKUP(A2, D2:F100, 2, FALSE), "Not Found") to display the words 'Not Found' instead of an ugly #N/A error.