Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You use some thing like this: Worksheets("X").PivotTables("Y").DataFields(1).Cal culation= xlSum -- JP http://www.solutionsvba.com "Sugith Kumar" wrote in message ... I have a code as follows in a VB Subroutine. With .PivotFields("Next Quarter") .Orientation =4 .Position = 7 End With the problem is, the field "Next Quarter" is coming as "Count of" field instead of "Sum of". So all the values in this field are distorted. How do I force this field to "Sum of"? Any idea? A quick reply is appreciable. Thanks Sugith |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi sapta, Peter Atherton, Andy DeVries, Tom Ogilvy and
Jean-Paul Viel - thanks to all of you for suggesting solutions. This worked well. Now I have another problem. I'm creating a chart based on a pivot table. I use ChartType = xlColumnStacked. but for some of the datafield values, I want a different ChartType. How do I do this? In the existing code I use, chtNew.ChartType = xlColumnStacked . Here chtNew is the chart generated from the Pivot table. I'm not specifically setting ChartType for every datafields. Any idea how to have different chart type for different data fields? Thanks in advance Sugith -----Original Message----- Hi, You use some thing like this: Worksheets("X").PivotTables("Y").DataFields (1).Calculation= xlSum -- JP http://www.solutionsvba.com "Sugith Kumar" wrote in message ... I have a code as follows in a VB Subroutine. With .PivotFields("Next Quarter") .Orientation =4 .Position = 7 End With the problem is, the field "Next Quarter" is coming as "Count of" field instead of "Sum of". So all the values in this field are distorted. How do I force this field to "Sum of"? Any idea? A quick reply is appreciable. Thanks Sugith . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Programming | Excel Discussion (Misc queries) | |||
ExCel programming | Charts and Charting in Excel | |||
Excel Programming | Excel Worksheet Functions | |||
Excel Programming in VB | Excel Programming |