Linking

J

John Persico

I have two files, each with a common column.

File1
item_no description weight
1234 widget 5lbs
1235 widget2 3lbs
1236 widget3 2lbs

File2
item_no price
1236 6.98
1234 5.90
1235 4.90

I want to create a third file that will import the price based on what the
item number is.
That is, I will link item_no from File 1 in Column1 in File3 (I know how to
do that), then I need Column2 to be created with the Price field based on
what the item_no in Column1 is. So, Column1 in File3 will grab the item_no
from File1, and then Column2 in File3 will grab the appropriate price from
File2.

Make sense?

File


--
 
K

Kidaeshus

File 3's column 2 should use the SUMIF or VLOOKUP formula.

=sumif(File2!A:A, A1, File2!B:B) (however, this could double prices if
double entries occur in File 2)

=vlookup(A1, File2!A:B, 2, false) (will only return the FIRST price
that matches an item_no in File3's column 1 and will return #N/A if
not found)

HTHs.
 

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