Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Pivot Table Data and Paste into New File
I have a spreadsheet with a pivot table, the table basically lists orders
placed by customers. What I need to do is filter the pivot table so that only orders for a particular customer shows i.e untick "show all" and only select the customer I wish to view, then copy the data and insert/paste it into a new excel file. This process then needs to be repeated for each customer in the filter list. I have managed to do the above using a macro, however the filter list that shows the customer names will change often so the macro is only of any use if the customers never change, so what I need is a script that can do all of the above but also go through the filter list from start to end regardless of how many entries there may be or if they have changed. Can anyone help me? I can supply the excel file and/or screenshots. Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Pivot Table Data and Paste into New File
To loop throught the list of customers use something like
for each itm in activesheet.PivotTables(1).PivotFields("Customer") .PivotItems Next See Debra Dalgleish's site for hints on working with Pivot Tables, including using code. http://www.contextures.com/tiptech.html -- Regards, Tom Ogilvy "S Sainsbury" wrote in message ... I have a spreadsheet with a pivot table, the table basically lists orders placed by customers. What I need to do is filter the pivot table so that only orders for a particular customer shows i.e untick "show all" and only select the customer I wish to view, then copy the data and insert/paste it into a new excel file. This process then needs to be repeated for each customer in the filter list. I have managed to do the above using a macro, however the filter list that shows the customer names will change often so the macro is only of any use if the customers never change, so what I need is a script that can do all of the above but also go through the filter list from start to end regardless of how many entries there may be or if they have changed. Can anyone help me? I can supply the excel file and/or screenshots. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
any way to copy and paste values from pivot table and keepformatting? | Excel Discussion (Misc queries) | |||
Printing pivot table along with a copy and paste for each page fie | Excel Discussion (Misc queries) | |||
Pivot table copy and paste | Excel Worksheet Functions | |||
copy/paste pivot table | Excel Worksheet Functions | |||
Pivot Table Copy Paste | Excel Programming |