Hello All, I have a workbook that I download that contains a worksheet that has a varying amount of rows each time I download it. Sometimes I can have 10 rows, while other times, I can have 80 rows. This worksheet has a column named "Fruit" and the number and kind of fruits can vary. There is also no master list of these fruits. New fruits can be added at any time, so a lookup list would not work in this scenario. What I need is code that will create a new worksheet for each unique fruit in the fruits column, deleting all fruits except for that one unique fruit. Note that there are usually no more than 20 unique fruits every time I download the workbook but this can vary. Here's an example... 1. I download my usual workbook. 2. This particular time, there happens to be 6 unique fruits. 3. There are 21 rows in this download (Title row + 20 rows of data). 4 fruits each have values in 3 rows (12 rows total) 2 fruits each have values in 4 rows ( 8 rows total) This is a total of 6 unique fruits. Therefore, in addition to the original worksheet, 6 additional worksheets should be created. For example, let's say I have... 1. Banana - In 3 rows in the "Fruit" column 2. Grape - In 3 rows in the "Fruit" column 3. Cherry - In 3 rows in the "Fruit" column
This question generated 14 answers. To proceed to the answers, click here.
This thread is current as of August 11, 2017.
For more resources for Microsoft Excel:
This article includes the following tags:
- Microsoft Excel