Hello,
I have two sheets, Actuals Pivot Table and AllDepts. Actuals Pivot table has pivot table data in A-G and AllDepts has a list in column C as below. There are 30 departments on the AllDepts tab.
I am looking for a code to loop through the department list above and for each department name it has to filter the pivot table on the Actuals Pivot Table sheet by the department and then copy the filtered (A-G including headers) data and paste (should be in same format as source) it in a new workbook and save the workbook in the same path as the current workbook. The sheet name in the new workbook should also be the Department name.
I have two sheets, Actuals Pivot Table and AllDepts. Actuals Pivot table has pivot table data in A-G and AllDepts has a list in column C as below. There are 30 departments on the AllDepts tab.
I am looking for a code to loop through the department list above and for each department name it has to filter the pivot table on the Actuals Pivot Table sheet by the department and then copy the filtered (A-G including headers) data and paste (should be in same format as source) it in a new workbook and save the workbook in the same path as the current workbook. The sheet name in the new workbook should also be the Department name.