Excel Conundrum

Y

Yvette

I need to determine what is the best way to do the
following:
I have 2 worksheets within the same workbook, one I
call "Parts Combined Lists", one I call "Parts Costs".
The first contains part numbers and descriptions and
names of the parts. Using this list, I copy just the
part numbers into a query in an SAP database to get the
cost of any of these part numbers. The result is that
only 1/3 of the part numbers (from my sheet) have
associated costs. I then copy that result to the "Parts
Costs" sheet, 2 columns, "A" contains part numbers that
had associated costs, and "B" contains those costs. I
need to match up those costs with their associated part
numbers in my first sheet, "Parts Combined Lists". I've
tried VLOOKUP, however I don't have much knowledge of
this function. I've tried MATCH, I get errors. Is this
the right kind of function to do this or am I totally
going in the wrong direction. I am really stumped and
could use some help on this one.

Thanks in advance.
YMB
 
R

Ragdyer

Either Vlookup or Index and Match can do the job for you.

Vlookup is probably easier to comprehend, so try this:

Assumptions:

Sheet2 - Parts Costs
Columns A1 to B100
A - Part Numbers
B - Part Costs
A1 to B1 - Labels
Data - A2 to B100

Sheet1 - Parts Combined Lists
Columns A1 to C100
A - Part Numbers
B - Part Description
C - Part Name
A1 to C1 - Labels
Data - A2 to C100

Enter this formula in D2 of Sheet1 (PCL):

=VLOOKUP(A2,'Parts Costs'!$A$2:$B$100,2,0)

And drag down to copy as needed.
 
Top