Copy rows from workbook A to another workbook B based on the column value in workbook A

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.

EMP IDEMP NAMEJOB TITLE
101JamesSoftware Engineer
546SamuelDesigner
324XavierTechnician

<colgroup><col><col><col></colgroup><tbody>
</tbody>

<tbody>
</tbody>
I have the below data in workbook B in worksheet Sheet1.

EMP IDEMP NAMEJOB TITLE
101JamesSoftware Engineer
145RobertSystem Analyst
546SamuelWeb Developer
324XavierTechnician
345RachelResearcher

<tbody>
</tbody>

<tbody>
</tbody>
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:

Some videos you may like

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.

Watch MrExcel Video

Forum statistics

Threads
1,122,168
Messages
5,594,632
Members
413,919
Latest member
ZaxAlchemist

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
Top