comare and copy

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have two worksheets(1, 2). There are two columns (item code, description)
in the two worksheets. I want to compare the item codes in the worksheet1 and
worksheet2 then if the item codes are same in two worksheets, copy the
description from worksheet1 to worksheet2 automatically. How can I do it ?
Thank you!

Best regards,
 
Let's assume your item codes are in column A on both worksheets, and you have
descriptions in column B in the 1st worksheet only.

In the 2nd worksheet, column B, put this formula

=VLOOKUP(A2,Sheet1!$A$2:$B$1000,2,0)

and copy it down. That assumes you have 1000 rows filled on Sheet1. Adjust the
references to suit.

To convert those formula to their values, Edit/Copy the column of formulas,
then, without changing the selection, Edit/Paste Special and select the Values
option.
 
It works. Thank you very much!

Myrna Larson said:
Let's assume your item codes are in column A on both worksheets, and you have
descriptions in column B in the 1st worksheet only.

In the 2nd worksheet, column B, put this formula

=VLOOKUP(A2,Sheet1!$A$2:$B$1000,2,0)

and copy it down. That assumes you have 1000 rows filled on Sheet1. Adjust the
references to suit.

To convert those formula to their values, Edit/Copy the column of formulas,
then, without changing the selection, Edit/Paste Special and select the Values
option.
 

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

Back
Top