If statement needed

P

Patsy

:confused:

Howdy,

I have an Excel Spreadsheet with five headers

Product name
Supplier
Product code
Cust number
Revision date

The problem is I have another spreadsheet with the "Product Codes" tha
are from 3 to 6 char long.
I need to merge these sheets together some how. I would do i
manually but I have a 20 page spreadsheet. (sigh)

If I export the "Product Codes" field only into my Master spreadsheet
sort the spreadsheet by "Product Name"

(Please note the first 3 to 5 letters of the "Product Code" match u
with the "Product Name")

Is there an if statement I can use to match and insert the "Produc
Code with the Product Name?

For example

Product Name| Supplier Product Code| Cas # | RevDate
Exported Prod code
Acetone Dow 555-50
11/04 Ace111

Toc855

Utz665
The Product Code field is missing because I have another spreadshee
with Codes that needs to match up with the Product name.

I copied all of the product codes into the excel spreadsheet and sorte
them
what if statement can I use to put the Exported field in Product cod
field and match. The correct Exported field should be Ace111

if product name = Product code on spreadsheet insert Product cod
?????

Any help will be greatly appreciated.
 
J

JulieD

Hi Patsy

sounds like a VLOOKUP will work
assuming on sheet2 you have the product names in column A and the associated
codes in column B then
in the first sheet in the code column type
=VLOOKUP(A2,Sheet2!$A$2:$B$1000,2,0)
which means lookup the product name in this sheet in the first column of
sheet 2 and return the information from column B where there is an exact
match.
and fill down all your products.

Hope this helps

Cheers
JulieD
 

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