Fix Excel VLOOKUP Returning Incorrect Results or #N/A Error
Question details
The VLOOKUP function is returning incorrect values for the first row of data and displaying #N/A errors for subsequent rows.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Pulling matching data from a table array using the VLOOKUP formula.
- Observed behavior
- The formula returns a mismatched value for the initial row and #N/A errors for the rest, often caused by referencing entire columns instead of specific data ranges.
Before modifying your formulas, verify that the lookup value actually exists in the very first column of your selected table array, as VLOOKUP searches strictly from left to right.
Replace Entire-Column References with a Defined Range
Using entire-column references (like A:F or $1:$1048576) can sometimes cause incorrect indexing or errors. Limiting the table array to the exact data range resolves this issue.
When an entire column is referenced, Excel evaluates hundreds of thousands of empty cells, which can trigger unpredictable results or slow down your workbook. Restricting the lookup array to your actual data set ensures accurate matches.
Click on the cell containing the VLOOKUP formula that is returning the incorrect result or error.
In the formula bar, locate the second argument of your VLOOKUP formula (the table_array). Delete the entire-column reference (e.g., $1:$1048576 or A:F).
Type or drag to select your exact data range, making it absolute by pressing F4 (e.g., $A$1:$F$10000). If your data expands beyond this, increase the row number accordingly.
Press Enter to save the formula, then drag the fill handle down to apply this corrected range to the rest of the rows.

Clean Data to Resolve Remaining #N/A Errors
If defining a specific range fixes the incorrect values but leaves some cells as #N/A, the data types might be mismatched or hidden spaces may exist.
Use WPS Spreadsheet to Write and Troubleshoot VLOOKUP Easily
WPS Spreadsheet offers an intuitive Formula Builder and smart error-checking tools that make it easy to set up precise VLOOKUP ranges and identify mismatched data without the hassle.
- 1. Open your file in WPS Office: Launch WPS Spreadsheet and open the document containing your data.
- 2. Use the Insert Function tool: Select the cell where you want the VLOOKUP result, then click the 'fx' icon next to the formula bar.
- 3. Select ranges visually: Search for VLOOKUP. Use the dialog box to highlight your exact 'Table_array' range directly on the sheet, which automatically locks the cell references.
- 4. Complete the formula: Input your 'Lookup_value', 'Col_index_num', and type '0' for 'Range_lookup' to guarantee exact matches, then click OK.

Frequently Asked Questions
Why does VLOOKUP return the wrong value instead of an #N/A error?
This typically happens when the 'Range_lookup' (fourth argument) is set to TRUE or omitted. This allows approximate matches, causing Excel to return the next largest value that is less than your lookup value if the data is sorted. To fix this, always use FALSE or 0 for an exact match.
What exactly does the #N/A error mean in a VLOOKUP formula?
The #N/A error stands for 'Not Available.' It indicates that the exact lookup value you are searching for cannot be found in the very first column of your specified table array.
Can formatting differences cause a VLOOKUP #N/A error?
Yes. If your lookup value is formatted as a Number, but the corresponding value in the table array is formatted as Text (or vice versa), VLOOKUP will not recognize them as a match and will return #N/A.
How do I make my table array range absolute so it doesn't shift?
While typing or editing your formula, highlight the table array reference (like A1:F10) and press the F4 key on your keyboard. This adds dollar signs ($A$1:$F$10), locking the reference so it won't shift when you drag the formula to other cells.




