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:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,215,040
Messages
6,122,806
Members
449,095
Latest member
m_smith_solihull

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