Skip to main content

How to vlookup numbers stored as text in Excel?

Supposing, I have the following data range, the ID number in the original table is number format, in the lookup cell which is stored as text, when I apply the normal VLOOKUP function, I will get an error result as below screenshot shown. In this case, how could I get the correct information if the lookup number and original number in table have the different data format?

Vlookup numbers stored as text with formulas

doc vlookup number stored as text 1


arrow blue right bubble Vlookup numbers stored as text with formulas

If your lookup number is stored as text, and the original number in the table is real number format, please apply the following formula to return the correct result:

Enter this formula: =VLOOKUP(VALUE(G1),A2:D15,2,FALSE) into a blank cell where you want to locate the result, and press Enter key to return the corresponding information you need, see screenshot:

doc vlookup number stored as text 2

Notes:

1. In the above formula: G1 is the criteria that you want to lookup, A2:D15 is the table range which contains the data that you want to use, and the number 2 indicates the column number which has the corresponding value you want to return.

2. If your lookup value is number format, and the ID number in the original table is stored as text, the above formula will not work, you should apply this formula: =VLOOKUP(TEXT(G1,0),A2:D15,2,FALSE) to get the correct result as you need.

doc vlookup number stored as text 3

3. If you are not sure when you'll have numbers and when you'll have text, you can use this formula: =IFERROR(VLOOKUP(VALUE(G1),A2:D15,2,0),VLOOKUP(TEXT(G1,0),A2:D15,2,0)) to handle both cases.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Worked. Thank you! 
This comment was minimized by the moderator on the site
Hello,
You are welcome. Glad it helps. Any questions, please feel free to contact us. Have a great day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
Thanks so much!!!!! This worked for me, the #3 solution! HUGE help!!!
This comment was minimized by the moderator on the site
Hello,
You are welcome. Glad it helps. Any questions, please feel free to contact us. Have a great day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
Thank You... :) Its worked for me
This comment was minimized by the moderator on the site
Hello,
You are welcome. Glad it helps. Any questions, please feel free to contact us. Have a great day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
Same thing here. The problem is the data range. For some reason, even when the data type is text, MS Excel still looks at it as a number. But if you hit enter, it looks at it as text. So I usually end up with the data range where some of it is numbers and others, text.

SOLUTION: Use IFERROR function to address BOTH possibilities: IFERROR(VLOOKUP(TEXT(A1,0),$A$1:$A$100,1,FALSE),VLOOKUP(VALUE(A1),$A$1:$A$100,1,FALSE)). Hope this helps.
This comment was minimized by the moderator on the site
Unfortunately this method does not Always work. I import numbers in a column defined as tekst. I lookup these numbers in a table in which the numbers are also stored as tekst. I would say a Vlookup should work, but nor the standard lookup, nor the lookup with TEXT() or VALUE() function as expected. When I retype all values in the columns it works as expected, so there's no error in the formula.
This comment was minimized by the moderator on the site
I have the same problem @Rens, does anybody know a solution for this?
This comment was minimized by the moderator on the site
Same thing here. The problem is the data range. For some reason, even when the data type is text, MS Excel still looks at it as a number. But if you hit enter, it looks at it as text. So I usually end up with the data range where some of it is numbers and others, text.

SOLUTION: Use IFERROR function to address BOTH possibilities: IFERROR(VLOOKUP(TEXT(A1,0),$A$1:$A$100,1,FALSE),VLOOKUP(VALUE(A1),$A$1:$A$100,1,FALSE)). Hope this helps.
This comment was minimized by the moderator on the site
This is what I do and is perfect.
This comment was minimized by the moderator on the site
Same thing here. The problem is the data range. For some reason, even when data type is text, it looks like it's still looked on as a number. But if you hit enter, it looks at it as text. So I usually would end up with the data range where some of it is numbers and others text.

SOLUTION: Use IFERROR function to address BOTH possibilities: IFERROR(VLOOKUP(TEXT(A1,0),$A$1:$A$100,1,FALSE),VLOOKUP(VALUE(A1),$A$1:$A$100,1,FALSE)). Hope this helps.
This comment was minimized by the moderator on the site
Hello Jaji, thanks, this works, I hope in all cases. Nevertheless it looks like a bug to me.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations