How do I compare two sheets and add a code number from one t

LB_UK

New Member
Joined
Mar 20, 2002
Messages
20
I have two worksheets.sheet1(the order sheet)can contain the type of info shown here.(variable quantity 2-1000 rows)
A B C D
Code Item1 Item2 Item3
1158 1 0 0
1215 0 1 0
1220 1 0 0
1332 0 0 1

Sheet2. contains the master list of codes with addresses. (up to 1000 rows)in addition sheet2 contains an additional business code for each address. (see below) Basically I need to compare the two lists by code and have the business number inserted into the order sheet beside the correct code.In col.E

Sheet2
A B C
Bus.Num. Code Address
101 1158 etc.etc.
102 1159 etc.etc.
103 1202
104 1215
This message was edited by LB_UK on 2002-03-22 04:35
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Sounds like you want to use VLOOKUP, although I'm not that familiar with it myself.
If on sheet 2 you moved the code to column A instead (with Bus.Num. in column B), then on Sheet1, the formula in cell E2 would be
=VLOOKUP(A2,Sheet2!A2:C1000,2,FALSE)

HTH.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top