using extracted #'s to do vlookup

  • Thread starter Thread starter matmich
  • Start date Start date
M

matmich

I use a right or left command to extract a series of #'s from a PN.
Once I have the #'s i use a vlookup command to search for values. Bu
the vlookup wont recognize these #'s and returns #n/a. WHY??? If
enter the number (data entry) everything is ok. I have 2000+ #'s t
read, can someone explain and give me a solution
 
It is seeing those numbers as text (since you used right and/or left
which returns a string rather than a number. The VLookup sees th
number 2 as being different than the "letter" 2. In you left/righ
statements, change to add the Value() function:

=Value(Right(A1,5))

This should convert to numbers and should work if everything else i
OK.
 
The left and right functions return strings, use
the "Value" function to convert to a number.
=value(left(A1,3))

Good Luck
 
The left and right functions return strings, use
the "Value" function to convert to a number.
=value(left(A1,3))

Good Luck
 
Hi,

VLOOKUP doesn't recognize those values because the LEFT and RIGHT
functions return a value in the text format. You need to convert them
to numeric values by preceding the functions with two dashes. For
example:

=--LEFT(A1,4)

So, in your case, you can easily make these changes using FIND and
REPLACE, something like:

Edit > Replace
Find What: LEFT
Replace With: --LEFT

Hope this helps!
 
Also...

=VLOOKUP(--LEFT(...),...)

=VLOOKUP(LEFT(...)+0,...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top