Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Pivot Table Macro not inserting all data fields
I recorded a macro of me creating and populating a pivot table.
However, when I then run the macro, it is not fully poplulating the pivot table. The code recorded for the macro is as follows: ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "Oct!R1C1:R59C12").CreatePivotTable TableDestination:= _ "'[DCs Issued_2006.xls]Oct'!R63C2", TableName:="PivotTable9", DefaultVersion _ :=xlPivotTableVersion10 ActiveWindow.SmallScroll Down:=20 With ActiveSheet.PivotTables("PivotTable9").PivotFields ("Funder") .Orientation = xlRowField .Position = 1 End With ActiveSheet.PivotTables("PivotTable9").AddDataFiel d ActiveSheet.PivotTables( _ "PivotTable9").PivotFields("Funder"), "Count of Funder", xlCount ActiveSheet.PivotTables("PivotTable9").AddDataFiel d ActiveSheet.PivotTables( _ "PivotTable9").PivotFields("Price"), "Sum of Price", xlSum With ActiveSheet.PivotTables("PivotTable9").PivotFields ("Status") .Orientation = xlRowField .Position = 2 End With When created, the pivot table has the following columns: Funder, Status, Data (Count and Sum), Total However, when I run the macro I just recorded, I get the following columns: Data (Count and Sum), Status, Total For some reason, it does not seem to add the second Funder column when the macro is run. Any suggestions on what could be wrong. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
data table based on data table | Excel Discussion (Misc queries) | |||
Excel Macro to Copy & Paste | Excel Worksheet Functions | |||
Pivot Table Data Filter Problem | Excel Discussion (Misc queries) | |||
Pivot Table Data Field Query | Excel Worksheet Functions | |||
How can deleted data reappear in a refreshed pivot table in Excel | Excel Discussion (Misc queries) |