Cut entire rows of worksheet where column 'vEmailAddress' contains duplicate. New Worksheet for each set

Benison69

New Member
Joined
Apr 25, 2016
Messages
12
Hi, I have a workbook with Columns in A:AB. This is an extracted CSV file so column positioning may change.
I'm looking for a VBA script, to sort column vEmailAddress, for any duplicates to cut entire row to a new worksheet/ workbook. Each worksheet/book, must be a unique list, without loosing any of the data.

Example:
Source Table:
fNamelNamevEmailAddressCost
fredbloggsjbloggs@gmail.com£34
timsmithsmith@gmail.com£12
joebloggsjbloggs@gmail.com£20
jamessmithsmith@gmail.com£10
BeckyBloggsjbloggs@gmail.com£18
tomtomtom@gmail.com£20


Desired Output:
Workbook1
fNamelNamevEmailAddressCost
freddbloggsjbloggs@gmail.com£34
timsmithsmith@gmail.com£12
tomtomtom@gmail.com£20

Workbook2
fNamelNamevEmailAddressCost
joebloggsjbloggs@gmail.com£20
jamessmithsmith@gmail.com£10

Workbook3
fNamelNamevEmailAddressCost
BeckyBloggsjbloggs@gmail.com£18


Hope this makes sense! I have tried lots of vba examples I've seen already but none working quite as I need!

Thanks,
Matt
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi, I have a workbook with Columns in A:AB. This is an extracted CSV file so column positioning may change.
I'm looking for a VBA script, to sort column vEmailAddress, for any duplicates to cut entire row to a new worksheet/ workbook. Each worksheet/book, must be a unique list, without loosing any of the data.

Example:
Source Table:
fNamelNamevEmailAddressCost
fredbloggsjbloggs@gmail.com£34
timsmithsmith@gmail.com£12
joebloggsjbloggs@gmail.com£20
jamessmithsmith@gmail.com£10
BeckyBloggsjbloggs@gmail.com£18
tomtomtom@gmail.com£20


Desired Output:
Workbook1
fNamelNamevEmailAddressCost
freddbloggsjbloggs@gmail.com£34
timsmithsmith@gmail.com£12
tomtomtom@gmail.com£20

Workbook2
fNamelNamevEmailAddressCost
joebloggsjbloggs@gmail.com£20
jamessmithsmith@gmail.com£10

Workbook3
fNamelNamevEmailAddressCost
BeckyBloggsjbloggs@gmail.com£18


Hope this makes sense! I have tried lots of vba examples I've seen already but none working quite as I need!

Thanks,
Matt
Does anyone have any suggestions for this macro?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
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