I'm just getting in to pivot tables, so in my attempt to control them with VBA I recorded my self making a pivot table to count the occurrences of an item. I based what I was trying to do off of this youtube video: http://www.youtube.com/watch?v=OlTsegp3cDY
In short, I have a table like this:
Items Months Bananas May Apples June Banans July Bananas August Apples September Oranges November
It's on Sheet49, starting in R1C1. I recorded the following Macro while creating a PivotTable that includes the number of occurrences of each item. When I'm done, it looks like this:
Pivot1.PNG
However, when I delete the pivot table, and run the recorded Macro (see below):
All I get is this:Please Login or Register to view this content.
Pivot2.PNG
I loose all the data in the PivotTable and only get the total number of items!
What is going on?
Thanks for any help!
Bookmarks