# vlookup

1. ## vlookup

How can I make this work?
I have a worksheet. I need to extract the first two digits of a number. The
two digit number determines which equipment to use.That number checks
against a vlookup table and then the equipment is entered in another cell.
The worksheet is much larger than this but this should give you an idea what
the problem is.

Example:
A1 = 8110332
B1 =LEFT(A1,2) B1 now shows 81
C1 =VLOOKUP(B1,D1:E1,2,FALSE)
D1 =81
E1 =Thingy

The #N/A error shows. I just need to enter the number in A1 and all the rest
is done for me. I know the problem rests with the formula in B1.  Register To Reply

2. ## Re: vlookup

Try

=VLOOKUP(--B1,D1:E1,2,FALSE)

or in B1 use

=--LEFT(A1,2)

then use your vlookup as originally stated

all the text functions return a text string

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com

<sycewm@sbcglobal.net> wrote in message
news:fzx3g.63869\$F_3.39103@newssvr29.news.prodigy.net...
> How can I make this work?
> I have a worksheet. I need to extract the first two digits of a number.
> The two digit number determines which equipment to use.That number checks
> against a vlookup table and then the equipment is entered in another cell.
> The worksheet is much larger than this but this should give you an idea
> what the problem is.
>
> Example:
> A1 = 8110332
> B1 =LEFT(A1,2) B1 now shows 81
> C1 =VLOOKUP(B1,D1:E1,2,FALSE)
> D1 =81
> E1 =Thingy
>
> The #N/A error shows. I just need to enter the number in A1 and all the
> rest is done for me. I know the problem rests with the formula in B1.
>  Register To Reply

3. ## Re: vlookup

> B1 =LEFT(A1,2) B1 now shows 81
> C1 =VLOOKUP(B1,D1:E1,2,FALSE)

The "+0" will coerce the text number
returned by LEFTinto a real number
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"sycewm@sbcglobal.net" wrote:
> How can I make this work?
> I have a worksheet. I need to extract the first two digits of a number. The
> two digit number determines which equipment to use.That number checks
> against a vlookup table and then the equipment is entered in another cell.
> The worksheet is much larger than this but this should give you an idea what
> the problem is.
>
> Example:
> A1 = 8110332
> B1 =LEFT(A1,2) B1 now shows 81
> C1 =VLOOKUP(B1,D1:E1,2,FALSE)
> D1 =81
> E1 =Thingy
>
> The #N/A error shows. I just need to enter the number in A1 and all the rest
> is done for me. I know the problem rests with the formula in B1.  Register To Reply

4. ## Re: vlookup

Thank You So Much. Exactly What I Wanted.

"Max" <demechanik@yahoo.com> wrote in message
news:AE3C9EA8-048F-40EB-91FE-83EF13233312@microsoft.com...
>> B1 =LEFT(A1,2) B1 now shows 81
>> C1 =VLOOKUP(B1,D1:E1,2,FALSE)

>
> Try instead in B1: =LEFT(A1,2)+0
>
> The "+0" will coerce the text number
> returned by LEFTinto a real number
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> xdemechanik
> ---
> "sycewm@sbcglobal.net" wrote:
>> How can I make this work?
>> I have a worksheet. I need to extract the first two digits of a number.
>> The
>> two digit number determines which equipment to use.That number checks
>> against a vlookup table and then the equipment is entered in another
>> cell.
>> The worksheet is much larger than this but this should give you an idea
>> what
>> the problem is.
>>
>> Example:
>> A1 = 8110332
>> B1 =LEFT(A1,2) B1 now shows 81
>> C1 =VLOOKUP(B1,D1:E1,2,FALSE)
>> D1 =81
>> E1 =Thingy
>>
>> The #N/A error shows. I just need to enter the number in A1 and all the
>> rest
>> is done for me. I know the problem rests with the formula in B1.  Register To Reply

5. ## Re: vlookup

You're welcome ! Glad it helped.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
<sycewm@sbcglobal.net> wrote in message
news:5gy3g.19862\$tN3.6380@newssvr27.news.prodigy.net...
> Thank You So Much. Exactly What I Wanted.  Register To Reply