Lookup and match then return data from another sheet

C

Charlie510

We manufacture hundreds of parts for multiple clients. In sheet1 there are
drop down menus to choose the client and the unique part description of the
parts that were produced. Sheet 2 contains a master list of part descriptions
and the corresponding part codes. I would like the part code to
automatically populate on Sheet1 once the corresponding part description has
been selected.

Sheet1: Choose clients and parts produced

Column A: Client B: Description C: Part Code
GE 5mm Bolt
GE 7mm Bolt
BMW 9mm Washer

Sheet 2: Master List

Column A: Client B: Description C: Part Code
GE 5mm Bolt INT5105
GE 6mm Bolt INT5106
GE 7mm Bolt INT5107
BMW 5mm Washer INT6005
BMW 6mm Washer INT6006
BMW 7mm Washer INT6007

Is it possible to lookup and match the part description and then return the
corresponding part code from Sheet2 to Sheet1?

Hope this makes sense.
 
N

N Harkawat

Array function (copy this formula and enter in cell c2and press
ctrl+shift+enter
Index(Sheet2!c$1:c$500,match(1,(Sheet2!B$1:B$500=b2)*(Sheet2!a$1:a$500=a2),0))
 
C

Charlie510

Alright, taking into consideration that the part descriptions are unique I
ignored the client data entered the following formula which is resulting in
an error "#NA", and I'm not sure what I've missed.

=INDEX('Sheet2'!C$4:C$311,MATCH(1,('Sheet2'!B$4:B$311=B12),0))

Thanks
 
C

Charlie510

Sorry, one more bit of info: the error "#NA" is occuring in the Row_Num field
of the INDEX function.
 
N

N Harkawat

If client data is unique then a simple vlookup should do:

=vlookup(b2,sheet2!b$1:c$500,2,0)
 
C

Charlie510

For some reason I'm getting a "#REF!" errow; however, when I point the
formula to Column 1 it returns the part description just fine:

=VLOOKUP(B2,'Sheet2'!B$4:B$311,1,0)

I'm not sure why it won't return the part code from the column next door????
 
C

Charlie510

Thanks so much for your help. The "#REF!" error was due to the fact that I
wasn't including column c in the array. It works beautifully.
 

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