Zend certified PHP/Magento developer

VBA Code to take list of duplicated customer IDs and distribute into unique sheets

I have a VBA problem I’m working on. My data set is using customer data which includes an identifier, first name, surname, email and a marketing ID.

The data contains rows where the customer has a more than one identifier but the same email address and marketing ID. The number of duplicated email addresses can be up to 11 or 12.

I need to take this data and distribute into perfectly unique lists.

So in the example where the customer email is used 12 times, each iteration needs it’s own new sheet. 1 through 12, so I end up with 12 sheets and 1 version of that customer email and identifier on each of the 12 sheets.

Ideally I can then run that across the whole original data set to produce a set of sheets which are all unique.

In the below example I would begin with, 3 new sheets each with 1 Mrman@email.com and associated ID, and the remainder of the unique lines in sheet 1.

ID email
123456 Mrman@email.com
999999 Mrman@email.com
456524 Mrman@email.com
678612 asdad@email.com
777777 tjtyj@email.com