twmills
05-04-2022, 11:59 AM
Hello,
In the attached spreadsheet I'm looking to filter for each value in column B (DTCC #) in the Cost Basis tab. Then create a separate workbook based on what is visible when filtered. Then repeat this process for each different DTCC # that's listed.
I started off creating code that copies all the DTCC numbers and pasting them to the DTCC List tab. Then it'll remove the duplicates to reveal each unique DTCC number in the table. Then I imagine using some sort of loop formula with an AutoFilter code can be created to filter each DTCC number one at a time. Creating a separate workbook for each filtered DTCC number as the loop occurs. In the VBA screen - module1 - I started building the code. Got stuck on the AutoFilter criteria that's referencing the DTCC List tab.
Basically, I'm looking to create a separate workbook for each number listed after the DTCC_List macro is triggered. In this scenario, there are 12 different DTCC numbers in the Cost Basis tab. I would like a separate workbook created for each of the 12 numbers, and it's corresponding lines that are visible when filtered.
Thanks so much as always. You guys (and girls) have always been a huge help.
In the attached spreadsheet I'm looking to filter for each value in column B (DTCC #) in the Cost Basis tab. Then create a separate workbook based on what is visible when filtered. Then repeat this process for each different DTCC # that's listed.
I started off creating code that copies all the DTCC numbers and pasting them to the DTCC List tab. Then it'll remove the duplicates to reveal each unique DTCC number in the table. Then I imagine using some sort of loop formula with an AutoFilter code can be created to filter each DTCC number one at a time. Creating a separate workbook for each filtered DTCC number as the loop occurs. In the VBA screen - module1 - I started building the code. Got stuck on the AutoFilter criteria that's referencing the DTCC List tab.
Basically, I'm looking to create a separate workbook for each number listed after the DTCC_List macro is triggered. In this scenario, there are 12 different DTCC numbers in the Cost Basis tab. I would like a separate workbook created for each of the 12 numbers, and it's corresponding lines that are visible when filtered.
Thanks so much as always. You guys (and girls) have always been a huge help.