Hi,
[TABLE="width: 424"]
<tbody>[TR]
[TD] userid[/TD]
[TD] email[/TD]
[TD]phone[/TD]
[TD]domain[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]a@abc.com[/TD]
[TD]123-123-4425[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]b@abc.com[/TD]
[TD]012-123-1232[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]c@abc.com[/TD]
[TD]382-228-2383[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]d@abc.com[/TD]
[TD]456-744-7821[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]1@example.com[/TD]
[TD]123-123-3453[/TD]
[TD]example.com[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]2@example.com[/TD]
[TD]354-751-6526[/TD]
[TD]example.com[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]3@example.com[/TD]
[TD]456-744-7821[/TD]
[TD]example.com[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]adsd@gmail.com[/TD]
[TD]398-574-4126[/TD]
[TD]gmail.com[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]adfsd@yahoo.com[/TD]
[TD]412-123-1232[/TD]
[TD]yahoo.com[/TD]
[/TR]
</tbody>[/TABLE]
What I'm trying to do is have all rows associated with the most occuring domains copied sheet1, then second most common domain go into sheet2. It will continue alternating between the two sheets: third most will go to sheet1, then fourth into sheet2, and so on.
Since I can use LEN and create a column of just the domains and sort by frequency it appears, is there a macro that could go down the "domain" column and copy all rows of the first value into sheet1, then once it recognizes a different value put those rows into sheet2, etc.?
Really mind boggled. Thank you.
[TABLE="width: 424"]
<tbody>[TR]
[TD] userid[/TD]
[TD] email[/TD]
[TD]phone[/TD]
[TD]domain[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]a@abc.com[/TD]
[TD]123-123-4425[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]b@abc.com[/TD]
[TD]012-123-1232[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]c@abc.com[/TD]
[TD]382-228-2383[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]d@abc.com[/TD]
[TD]456-744-7821[/TD]
[TD]abc.com[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]1@example.com[/TD]
[TD]123-123-3453[/TD]
[TD]example.com[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]2@example.com[/TD]
[TD]354-751-6526[/TD]
[TD]example.com[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]3@example.com[/TD]
[TD]456-744-7821[/TD]
[TD]example.com[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]adsd@gmail.com[/TD]
[TD]398-574-4126[/TD]
[TD]gmail.com[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]adfsd@yahoo.com[/TD]
[TD]412-123-1232[/TD]
[TD]yahoo.com[/TD]
[/TR]
</tbody>[/TABLE]
What I'm trying to do is have all rows associated with the most occuring domains copied sheet1, then second most common domain go into sheet2. It will continue alternating between the two sheets: third most will go to sheet1, then fourth into sheet2, and so on.
Since I can use LEN and create a column of just the domains and sort by frequency it appears, is there a macro that could go down the "domain" column and copy all rows of the first value into sheet1, then once it recognizes a different value put those rows into sheet2, etc.?
Really mind boggled. Thank you.