Alternatives to VLOOKUP?

S

scott

For the life of me I can not figure out how to use VLOOKUP..is there
anything else I can try that might be easier?

My situation is this..

I have 2 worksheets.

1st worksheets have a bunch of codes and what the codes mean.
Basically a code book in excel format

example

aaa apples
bbb bananas
ccc carrots
ddd dairy
ppp peaches

2nd worksheet has a few codes for a customer that the customer uses.

aaa
ccc
ppp

I want to search worksheet 1 for the codes in worksheet 2...Then fill
in the info in worksheet 2 so worksheet 2 would look like this

aaa apples
ccc carrots
ppp peaches

Thanks
Scott
 
A

Arvi Laanemets

Hi

I assume you have header row on sheets, so data start from row 2.

When code table on Sheet1 contain data in A2:B100, and on Sheet2 you have
codes in column A and want description in column B, then enter into B2 on
Sheet2:
=VLOOKUP(A2,Sheet1!$A$2:$B$100,2,FALSE)


Arvi Laanemets
 
J

Jon Macmichael

scott said:
For the life of me I can not figure out how to use VLOOKUP..is there
anything else I can try that might be easier?

My situation is this..

I have 2 worksheets.

1st worksheets have a bunch of codes and what the codes mean.
Basically a code book in excel format

example

aaa apples
bbb bananas
ccc carrots
ddd dairy
ppp peaches

2nd worksheet has a few codes for a customer that the customer uses.

aaa
ccc
ppp

I want to search worksheet 1 for the codes in worksheet 2...Then fill
in the info in worksheet 2 so worksheet 2 would look like this

aaa apples
ccc carrots
ppp peaches

Thanks
Scott


name the range on wksht1 ie: RangeA1:B5 is named TheLot This just make
it easier.

In cell B1 =VLOOKUP(A1,TheLot,2,False)

then drag this formula down the range.

so, from B1, first the value in A1 is the 'look for', then the
specified range(now our named range, but doesn't have to be named,
maybe you just wish to use a reference) is used to 'look in'. Here
vlookup only looks down column 1 of the range which needs sorting.
When your value (in A1) is found then what is returned is what you
have in the 3rd spot in the function ie; ,2, which is what ever is
in column2 of the same row. ' ,False) ' is optional and stops a
closest match from being returned where the specific value is not
found.

from a novice
Jon
 

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

Top