Copying Specific Data Selection to new sheets

Closed
shevy - May 11, 2010 at 03:55 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 11, 2010 at 04:22 PM
How can I select entire rows based on a specific value found in a column via a macro when the occurence of the specific value is variable?

eg. My column of interest is customer. I want to select every row that has value of 2 for the column customer, then copy and paste this to a new sheet. I cant specify a reference area because the occurence of customer =2 is variable, it may be 20 records or 50 records.
What function / macro code can I use to accomplish this selection?

In bellow example I would have 3 new sheets created with 2 rows copied on the first, 4 on the second, and 4 on the fifth. (2 records with customer #2, 4 records with customer #3, and 4 records with customer #5)

Customer
2
2
3
3
3
3
5
5
5
5

All help is much appreciated!!

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 11, 2010 at 04:22 PM