addurisathvik
New Member
- Joined
- Apr 7, 2014
- Messages
- 4
Hi,
Could someone help me in achieving this. I require this to accomplish my project task. I am still a beginner in writing VBA and did lot of research over the internet and still empty handed.
I have the below data in workbook A in worksheet Sheet1.
[TABLE="width: 262"]
<tbody>[TR]
[/TR]
[TR]
[TD][TABLE="width: 262"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]EMP ID[/TD]
[TD]EMP NAME[/TD]
[TD]JOB TITLE[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]James[/TD]
[TD]Software Engineer[/TD]
[/TR]
[TR]
[TD]546[/TD]
[TD]Samuel[/TD]
[TD]Designer[/TD]
[/TR]
[TR]
[TD]324[/TD]
[TD]Xavier[/TD]
[TD]Technician[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have the below data in workbook B in worksheet Sheet1.
[TABLE="width: 262"]
<tbody>[TR]
[TD][TABLE="width: 262"]
<tbody>[TR]
[TD]EMP ID[/TD]
[TD]EMP NAME[/TD]
[TD]JOB TITLE[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]James[/TD]
[TD]Software Engineer[/TD]
[/TR]
[TR]
[TD]145[/TD]
[TD]Robert[/TD]
[TD]System Analyst[/TD]
[/TR]
[TR]
[TD]546[/TD]
[TD]Samuel[/TD]
[TD]Web Developer[/TD]
[/TR]
[TR]
[TD]324[/TD]
[TD]Xavier[/TD]
[TD]Technician[/TD]
[/TR]
[TR]
[TD]345[/TD]
[TD]Rachel[/TD]
[TD]Researcher[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a macro where i need to search the EMP ID present in Column A in the workbook A and find the same in Column A in the workbook B. When matched i want to copy the entire row for that EMP ID from workbook A and overwrite in the workbook B. If no match found i want to insert new row in the workbook B.
Please help me.
Thanks,
Sathvik
Could someone help me in achieving this. I require this to accomplish my project task. I am still a beginner in writing VBA and did lot of research over the internet and still empty handed.

I have the below data in workbook A in worksheet Sheet1.
[TABLE="width: 262"]
<tbody>[TR]
[/TR]
[TR]
[TD][TABLE="width: 262"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]EMP ID[/TD]
[TD]EMP NAME[/TD]
[TD]JOB TITLE[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]James[/TD]
[TD]Software Engineer[/TD]
[/TR]
[TR]
[TD]546[/TD]
[TD]Samuel[/TD]
[TD]Designer[/TD]
[/TR]
[TR]
[TD]324[/TD]
[TD]Xavier[/TD]
[TD]Technician[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have the below data in workbook B in worksheet Sheet1.
[TABLE="width: 262"]
<tbody>[TR]
[TD][TABLE="width: 262"]
<tbody>[TR]
[TD]EMP ID[/TD]
[TD]EMP NAME[/TD]
[TD]JOB TITLE[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]James[/TD]
[TD]Software Engineer[/TD]
[/TR]
[TR]
[TD]145[/TD]
[TD]Robert[/TD]
[TD]System Analyst[/TD]
[/TR]
[TR]
[TD]546[/TD]
[TD]Samuel[/TD]
[TD]Web Developer[/TD]
[/TR]
[TR]
[TD]324[/TD]
[TD]Xavier[/TD]
[TD]Technician[/TD]
[/TR]
[TR]
[TD]345[/TD]
[TD]Rachel[/TD]
[TD]Researcher[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a macro where i need to search the EMP ID present in Column A in the workbook A and find the same in Column A in the workbook B. When matched i want to copy the entire row for that EMP ID from workbook A and overwrite in the workbook B. If no match found i want to insert new row in the workbook B.
Please help me.

Thanks,
Sathvik
Last edited: