How to Fix VLOOKUP Errors: Numbers Stored as Text & Range Issues
Question details
The user is experiencing an error with a VLOOKUP formula because the lookup value and the source data have mismatched formats, or the selected lookup range starts in the wrong column.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Attempting to retrieve specific data, such as an invoice number, from a large dataset using lookup functions.
- Observed behavior
- The VLOOKUP formula returns an error because it searches the wrong column by default or fails to match a number formatted as text.
Verify the exact column where your lookup value is located and ensure it matches the very first column of your selected table array, while also double-checking that both datasets share the exact same number or text formatting.
Adjust the VLOOKUP Table Array to Start at the Correct Column
VLOOKUP strictly requires the lookup value to be present in the very first column of your selected table array. Adjusting the range fixes the most common lookup error.
If you select a range starting from column A, but your lookup value (like an invoice number) is actually in column C, VLOOKUP will not find the value. You must shift the starting point of your table array.
Locate the column in your dataset that contains the exact values you are searching for (e.g., column C).
Change your table array in the VLOOKUP formula so it begins with that specific column. For example, change A2:N25470 to C2:N25470.
Count from your new starting column to the column containing your return value and update the index argument in your formula (e.g., 8).
Ensure you add FALSE or 0 as the final argument to enforce an exact match, making your formula look like =VLOOKUP(Q2,C2:N25470,8,FALSE).

Fix Data Type Mismatches (Numbers Stored as Text)
If your table array is perfectly aligned but VLOOKUP still returns an error, your number might be formatted as text in one location and as a number in another.
Use XLOOKUP as a Flexible Alternative
XLOOKUP removes the VLOOKUP limitation of only searching the first column and eliminates the need to count column index numbers.
Fix VLOOKUP Issues Easily in WPS Spreadsheet
WPS Spreadsheet offers powerful data calculation tools, including smart error checking to instantly convert numbers stored as text. It fully supports both classic VLOOKUP and modern XLOOKUP formulas.
- 1. Open your spreadsheet: Launch WPS Spreadsheet and open the document containing the lookup errors.
- 2. Navigate to the Formulas tab: Select the cell where you want the calculation, then click the Formulas tab on the top ribbon.
- 3. Use the Insert Function wizard: Click 'Insert Function', search for VLOOKUP or XLOOKUP, and let the dialog box guide you through each argument to prevent syntax mistakes.
- 4. Format data seamlessly: Use the smart prompt icon next to text-formatted numbers to quickly convert them and make your formulas work instantly.

Frequently Asked Questions
Why does VLOOKUP return #N/A even when the value clearly exists?
This usually happens due to a data type mismatch (e.g., one value is a number and the other is a number stored as text), or due to hidden leading/trailing spaces in the cells. You can use the TRIM() function or convert the text to numbers to fix it.
Can VLOOKUP search for a value in the middle of a table array?
No, VLOOKUP strictly searches the very first column of the defined table array. If you need to search in the middle of a dataset, you should use XLOOKUP or an INDEX and MATCH combination.
How do I quickly convert a large column of numbers stored as text?
Select the entire column, go to the Data tab, select 'Text to Columns', and then click 'Finish' without changing any settings. This forces the spreadsheet engine to re-evaluate the data as standard numbers.
What is the primary difference between VLOOKUP and XLOOKUP?
While VLOOKUP requires the search column to be on the far left and uses a numerical index to return a result, XLOOKUP lets you independently select the search column and return column, allowing lookups in any direction without counting.




