Hello Everyone,

I'm in the middle of writing a macro and I'm not really sure how to work in producing a pivot table. Below is the code I have so far. It's fairly simple - using a list that is built on the "Info" tab and source worksheet located in the active workbook, it creates a new tab for each item on the list and copies the info from the source that pertains to that list item.

Please Login or Register  to view this content.
What I'd also like to happen is that for each item on the list, the macro also builds a pivot table using the UsedRange from the newly built tabs. For example, if "Monday" is on the list on the Info tab - the macro copies all the data that pertains to Monday in the source worksheet and builds a new tab with the data named "Monday" (this is already done in the code above), then the macro would build a pivot table based on the new "Monday" tab.

I believe I can add all the data fields using what I know in VBA, I'm just having an issue building the pivot tables by referencing a list and the newly formed tabs.

Let me know if you have any questions or need any other information.

Thanks in advance!