Hello ozgrid faithful,
I have been researching a VBA solution to a common problem, moving row(s) to a new sheet
based on column criteria. I have found several responses on this forum that deal with this issue, however the VBA responses
are too customized to the individual poster, and the number of unique criteria is too large to use an advanced filter
(repeatedly). I'm hoping someone could provide generic VBA coding to the problem, which I have illustrated below:
A data table has 'x' number of columns and 'y' number of rows. Column A has attribute data that will determine which
row(s) are copied to a new (VBA created) sheet, named after the attribute. The workbook will start with 1 sheet, and end
with multiple (creating a new one each time the Macro is run).
I understand that a Pivot Table would similarly
summarize this information, however I need to be able to electronically distribute a confidential list specific to each
attribute (AA can't see AB's, AB can't see AA's, etc). I'm not sure how the code is setup, but please ensure that it is
generic enough where the number of rows and columns can fluctuate (though column A will always contain the determining
I have attached a sample document with the criteria described above. Your help is greatly
The solution will have 5 tabs ["Sheet1", "AA", "AB", "AC", "AD"], each with 7 columns. "AA" and
"AB" will have 2 rows, "AC" and "AD" will have 1 row.