VBA to extract duplicates and copy in separate files

JW Tajonera

New Member
Joined
Jun 3, 2013
Messages
1
Hi,

For someone who is up to a challenge and unlike me who only has basic knowledge about VBA. I need help to create a macro that will do the following:

I am currently doing a project where I need to create a report and email them automatically using vba. Below is a sample of the raw data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name [/TD]
[TD]Executor[/TD]
[TD]ID[/TD]
[TD]Data 2[/TD]
[TD]Email address[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]IE[/TD]
[TD]0001[/TD]
[TD]a[/TD]
[TD]sample1@example.com[/TD]
[/TR]
[TR]
[TD]Jane[/TD]
[TD]DR[/TD]
[TD]0001[/TD]
[TD]b[/TD]
[TD]sample2@example.com[/TD]
[/TR]
[TR]
[TD]Jude[/TD]
[TD]DR[/TD]
[TD]0002[/TD]
[TD]a[/TD]
[TD]sample3@example.com[/TD]
[/TR]
[TR]
[TD]Jake[/TD]
[TD]IE[/TD]
[TD]0004[/TD]
[TD]b[/TD]
[TD]sample4@example.com[/TD]
[/TR]
[TR]
[TD]Julie[/TD]
[TD]IE[/TD]
[TD]0002[/TD]
[TD]b[/TD]
[TD]sample5@example.com

[/TD]
[/TR]
</tbody>[/TABLE]

To create the report I need to be able to extract entire row of matched/duplicate data in Column C (ID) and copy them in separate excel files (i.e. base on sample data, extract entire row of entries for ID 0001 and copy it in one file, then 0002 in another so on so forth) using the IDs as file name while the worksheet where the data is copied should be named as "Raw Data."

After the matched data are copied into individual files. I need to insert the reporting template from a different file into each of the individual files (or maybe we could copy the report template into the new file the same time it copies the duplicate/match data into the "raw data" worksheet).

After the report templates are added I need to email the report to email addresses of the Dr's under the executor column.

I would really appreciate any help you can provide.

Thank you.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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