Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Excel Programming in VB

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel Programming in VB

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
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
Excel Programming danjordan2000 Excel Discussion (Misc queries) 1 November 17th 08 01:20 PM
ExCel programming Jae[_2_] Charts and Charting in Excel 2 March 6th 07 07:44 PM
Excel Programming [email protected] Excel Worksheet Functions 0 April 14th 06 07:13 AM
Excel Programming in VB Peter Atherton Excel Programming 2 September 9th 03 12:40 PM


All times are GMT +1. The time now is 10:12 PM.

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

About Us

"It's about Microsoft Excel"