PC Review


Reply
Thread Tools Rate Thread

counting pivot table subfields

 
 
=?Utf-8?B?UmljaGFyZA==?=
Guest
Posts: n/a
 
      26th Oct 2006
I want to write macro to cycle through every subcategory in pivot table.
I have the pivot table broken out by category "8TA", so there is a pull down
menu for each of my companies 8 technical areas.

I recorded a macro and found out that to select a subcategory, I can use:
ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").CurrentPage = "MSS"

However to complete a macro do loop, I need to be able to count the number
of subareas (which in this case I know is 8), and then reference them
separately.


Neither of these tow count statements works:
Count = ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").Count
Count =
ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").CurrentPage.Count


--
Richard
 
Reply With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      27th Oct 2006
ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").PivotItems.Count


--
Regards,
Tom Ogilvy



"Richard" <(E-Mail Removed)> wrote in message
news:72427E0D-EAA0-49EF-8854-(E-Mail Removed)...
>I want to write macro to cycle through every subcategory in pivot table.
> I have the pivot table broken out by category "8TA", so there is a pull
> down
> menu for each of my companies 8 technical areas.
>
> I recorded a macro and found out that to select a subcategory, I can use:
> ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").CurrentPage = "MSS"
>
> However to complete a macro do loop, I need to be able to count the number
> of subareas (which in this case I know is 8), and then reference them
> separately.
>
>
> Neither of these tow count statements works:
> Count = ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").Count
> Count =
> ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").CurrentPage.Count
>
>
> --
> Richard



 
Reply With Quote
 
=?Utf-8?B?UmljaGFyZA==?=
Guest
Posts: n/a
 
      30th Oct 2006
Thanks.

Where can I find similar info for myself?

I would also like to adjust font size for x,y labels and for the pivot table
pull down menu showing PivotFields("8TA") - right now the graph's various
fonts are not ideally sized for export to a PowerPoint presentation.

--
Richard


"Tom Ogilvy" wrote:

> ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").PivotItems.Count
>
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> "Richard" <(E-Mail Removed)> wrote in message
> news:72427E0D-EAA0-49EF-8854-(E-Mail Removed)...
> >I want to write macro to cycle through every subcategory in pivot table.
> > I have the pivot table broken out by category "8TA", so there is a pull
> > down
> > menu for each of my companies 8 technical areas.
> >
> > I recorded a macro and found out that to select a subcategory, I can use:
> > ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").CurrentPage = "MSS"
> >
> > However to complete a macro do loop, I need to be able to count the number
> > of subareas (which in this case I know is 8), and then reference them
> > separately.
> >
> >
> > Neither of these tow count statements works:
> > Count = ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").Count
> > Count =
> > ActiveChart.PivotLayout.PivotTable.PivotFields("8TA").CurrentPage.Count
> >
> >
> > --
> > Richard

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table not counting onebodaciousbabe03 Microsoft Excel Misc 1 10th Dec 2009 07:11 PM
pivot table counting timmulla Microsoft Excel Misc 1 16th Sep 2008 05:25 PM
Pivot Table Counting Newbee Microsoft Excel Worksheet Functions 1 23rd May 2008 10:28 PM
counting in pivot table =?Utf-8?B?TWFyaXNh?= Microsoft Excel Worksheet Functions 14 15th Aug 2005 04:58 PM
Pivot table and counting =?Utf-8?B?Q2hyaXN0b3BoZXJI?= Microsoft Excel Worksheet Functions 1 20th Nov 2004 01:26 PM


Features
 

Advertising
 

Newsgroups
 


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