Merging two excel sheets

Closed
savgeorg Posts 6 Registration date Friday November 1, 2013 Status Member Last seen November 5, 2013 - Nov 1, 2013 at 03:48 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 12, 2013 at 10:50 AM
Hello guys im totally new here and i want to ask a question.
I have two excel sheets that i want to merge. Let me explain what i want to do and i hope u understand.
Both of them have one column let say column C the same.
I want a macro that checks column C identifies the same numbers that i have written in column C on both sheets and then to copy from the second sheet everything that is written in Column D and E to sheet 1 next to Column C.

Example

Sheet 1:
Column C

4002919-6
4002515-8
7215444-6
7235445-7

Sheet 2:
Column C Column D

4002510-6 TEST1
4002515-8 Test2
7216455-8 Test3
7215444-6 Test4

I want to find the same numbers from Column C and then to sheet 1 to copy the contents of Column D. Whenever there is no match field to leave Column D in Sheet 1 empty.

I hope u understand what i mean.

Thanx a lot
Related:

8 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Nov 1, 2013 at 08:20 PM
you can use vlookup
savgeorg Posts 6 Registration date Friday November 1, 2013 Status Member Last seen November 5, 2013
Nov 2, 2013 at 12:21 AM
i tried but it gives me error all the time
anybody can help me?
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Nov 2, 2013 at 07:44 AM
try some thing like this
=VLOOKUP(C1,Sheet2!C:E, 2, FALSE)
savgeorg Posts 6 Registration date Friday November 1, 2013 Status Member Last seen November 5, 2013
Nov 2, 2013 at 09:16 AM
Again gives me error.
I went to column D i paste this and the error is this #NAME?
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Nov 2, 2013 at 09:25 AM
see this to see if it helps in resolving your error
http://office.microsoft.com/en-us/excel-help/correct-a-name-error-HP010342326.aspx
savgeorg Posts 6 Registration date Friday November 1, 2013 Status Member Last seen November 5, 2013
Nov 3, 2013 at 01:14 AM
i read this already and i also read some other topics here that they tell about vlookup but didnt help. Is it possible to send u the file and check it for me please?
Thanx
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Nov 3, 2013 at 07:50 AM
you can upload the file at some file share site like speedyshare etc and post back the link to the FILE itself back here
savgeorg Posts 6 Registration date Friday November 1, 2013 Status Member Last seen November 5, 2013
Nov 4, 2013 at 01:10 PM
hell my friend and thanx for helping me
the link is http://speedy.sh/HxmrK/FILE2.xlsx
thanx a lot in advance
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Nov 5, 2013 at 11:41 AM
Hi Savgeorg,

To keep the cell empty when there isn't a match I added the ISERROR function to the formula of Rizvisa:

http://speedy.sh/e6Ska/Savgeorg-FILE2.xlsx

Best regards,
Trowa
savgeorg Posts 6 Registration date Friday November 1, 2013 Status Member Last seen November 5, 2013
Nov 5, 2013 at 12:12 PM
Thanx Trowa this is exactly what i want :)
One last question. If i want to add all the columns after Column C not just Column D what i should write on your formula?
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Nov 12, 2013 at 10:50 AM
Hi Savgeorg,

You mean like this?:
http://speedy.sh/Fwjde/Savgeorg-FILE2-V2.xlsx

Best regards,
Trowa