Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default counting pivot table subfields

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("8T A").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("8T A").Count
Count =
ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").CurrentPage.Count


--
Richard
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default counting pivot table subfields

ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").PivotItems.Count


--
Regards,
Tom Ogilvy



"Richard" wrote in message
...
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("8T A").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("8T A").Count
Count =
ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").CurrentPage.Count


--
Richard



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default counting pivot table subfields

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("8T A").PivotItems.Count


--
Regards,
Tom Ogilvy



"Richard" wrote in message
...
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("8T A").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("8T A").Count
Count =
ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").CurrentPage.Count


--
Richard




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
Pivot Table not counting onebodaciousbabe03 Excel Discussion (Misc queries) 1 December 10th 09 07:11 PM
pivot table counting timmulla Excel Discussion (Misc queries) 1 September 16th 08 05:25 PM
Pivot Table Counting Missile Man Excel Worksheet Functions 2 August 3rd 07 10:13 PM
counting in pivot table Marisa Excel Worksheet Functions 14 August 15th 05 04:58 PM
Counting in Pivot table Tony Excel Programming 1 May 15th 04 01:29 PM


All times are GMT +1. The time now is 09:24 AM.

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"