2 worksheets compare and add data

thinksuccess

New Member
Joined
Jan 29, 2003
Messages
16
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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,104
Members
448,548
Latest member
harryls

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