How to Fix the #N/A Error in an Excel VLOOKUP Formula
Question details
The user needs to resolve the #N/A error returned by a VLOOKUP formula when searching for data.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Looking up matching values across different tables or ranges using the VLOOKUP function.
- Observed behavior
- The formula returns an #N/A error instead of the matched value, typically caused by data type mismatches, invalid lookup values, or incorrect source ranges.
Ensure that your lookup value actually exists in the first column of your source data range, and check for hidden characters like trailing spaces that might prevent an exact match.
Fix Data Type Mismatches and Use IFERROR
Convert numbers stored as text to actual numbers, and force an exact match in VLOOKUP while handling unavoidable errors with IFERROR.
The most common cause of the #N/A error is a data type mismatch, such as searching for a number when the source data contains numbers stored as text. Correcting the format and forcing an exact match resolves this.
Select the cells containing numbers stored as text (often indicated by a small green triangle in the corner). Click the warning icon that appears and choose 'Convert to Number'.
Update your VLOOKUP formula to require an exact match by adding FALSE as the fourth argument. For example: =VLOOKUP([@[Pharmacy Number]], SLA_Data, 20, FALSE).
To cleanly hide the #N/A error when a value truly does not exist, wrap your formula in IFERROR: =IFERROR(VLOOKUP([@[Pharmacy Number]], SLA_Data, 20, FALSE), "").

Use INDEX and MATCH Alternative
Use a combination of INDEX and MATCH to avoid repetitive calculations and handle larger datasets more efficiently than standard VLOOKUP.
Combine Tables with Power Query
For growing datasets, merge tables using Power Query (Get & Transform) instead of relying on complex formulas.
Easily Fix Formula Errors in WPS Spreadsheet
WPS Spreadsheet fully supports advanced formulas including VLOOKUP, INDEX, MATCH, and IFERROR. You can seamlessly troubleshoot, process, and analyze your data without worrying about complicated syntax issues.
- 1. Open the file: Launch WPS Spreadsheet and open the document containing the #N/A errors.
- 2. Edit the formula: Double-click the cell returning the error or click the Formula Bar at the top to modify your VLOOKUP function.
- 3. Verify data types: Check that the lookup value and the source column share the same data type. Use the format cells menu to convert text to numbers if necessary.
- 4. Apply exact match: Ensure the fourth argument in your VLOOKUP formula is set to FALSE to enforce an exact match.
- 5. Handle missing data: Wrap your corrected VLOOKUP formula in an IFERROR function to replace remaining valid #N/A errors with blank spaces or custom text.

Frequently Asked Questions
Why does VLOOKUP return #N/A when the value is clearly in the source data?
This usually happens due to subtle data formatting issues. The most common culprit is a data type mismatch, where one value is formatted as a number and the other as text. It can also be caused by hidden trailing spaces. Using the TRIM function or standardizing cell formats to 'Number' can resolve this.
How do I hide the #N/A error without deleting the VLOOKUP formula?
You can hide the #N/A error by wrapping your existing formula in the IFERROR function. By typing =IFERROR(VLOOKUP(...), ""), Excel will display a blank cell instead of the #N/A error whenever a match is not found.
Can VLOOKUP return multiple results instead of throwing an error?
No, standard VLOOKUP is designed to stop at the first matching value it finds. If you need to extract multiple matching results, you should use the FILTER function (in newer spreadsheet versions) or complex array formulas combining INDEX and MATCH.




