# 2 worksheets compare and add data

#### thinksuccess

##### New Member
Hi,

I have 2 worksheets each with a common column and would like to match the columns and if there is a match take a value from the matching row in sheet 2 and place it in a new column in sheet 1

So it wouldl be like this:

Sheet1

Column A Column B (New Column)

Sheet2

Column A Column B Column C

So if Column A matches in sheet 1 and 2 take Column C in sheet 2 and place in Column B of sheet 1

Thanks

### Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
ThinkSuccess,
Check out the Excel On-line help regarding the Vlookup function. If you have any questions after that post back here and we will try and help you out.

i have and it's a bit over my head Please give me an example of how this should work.

Thanks

No problem

=Vlookup(A1, Sheet2!\$A\$2:\$B\$6,2,false)

The A1 would be the value on your main sheet, the one you want the associated lookup value for.

Sheet2!\$a\$2:\$B\$6
would be the table where you have the lookup values

2
Represents the column within the lookup range you want to select the value for.

Don't worry about the false for now, just always put it in when you need an exact match. When you have used the vlookups for a while check into the flag to see what it does.

Ex Sheet 1

A..........B............................................C
Jake....=vlookup(A1,Sheet2!\$A\$1:\$C\$6,2,false)
Would equal = 3(column set to 2)

Jake....=vlookup(A1,sheet2!\$A\$1:\$C\$6,3,false)
would equal =7(column set to 3)

Peter....=vlookup(A1,sheet2!\$A\$1:\$C\$6,2,false)
would equal 2(column set to 2)

Sheet 2
A.........B..........C
Mike....1..........3
Peter...2..........5
Jake....3.........7
John....4.........12
Mitch....5.........11
Sam.....6.........15

Thanks for the explanation although it's still above my head. I'm sorry.

Let me give you the exact example that I have and maybe that will help.

I need to match Cell B1 with cell A1 of sheet 2 and when a match is found I need to take Cell E2 of Sheet 2 and copy it to Cell F2 of sheet 1.

Then I belieeve I can just copy it down.

I would place the formula in Cell F2 right?

Thanks

Mabye this will be easier. I copied all the data into the same worksheet.

Now what I need to do is match 2 columns and when a match is made take the value of column 2 and place it in a new column

I need to match Column B and Column O if there is a match I need to take Column S of that matching row and place it in Column F of the same row.

I hope someone can help me, i've been searching and working on it all day.

Thanks

Replies
6
Views
264
Replies
3
Views
437
Replies
3
Views
254
Replies
16
Views
374
Replies
11
Views
377

Threads
1,203,064
Messages
6,053,318
Members
444,653
Latest member
Curdood

### 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

### 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