Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
data table based on data table BorisS Excel Discussion (Misc queries) 0 September 24th 06 03:11 PM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Pivot Table Data Filter Problem Pepikins Excel Discussion (Misc queries) 0 June 16th 05 09:12 AM
Pivot Table Data Field Query Pepikins Excel Worksheet Functions 1 June 14th 05 10:58 PM
How can deleted data reappear in a refreshed pivot table in Excel excel_user123456 Excel Discussion (Misc queries) 3 February 23rd 05 08:34 PM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"