Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Pivot Table Page Area selections in a macro

Is there an easy method to select multiple page area values to populate a
pivot table.

Example: A page area named "state" would list all 50 states but in a macro I
only want the states of Georgia and Tennessee. I do not want the user to have
to manually select. Just use a command button.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Pivot Table Page Area selections in a macro

Try doing it manually with the macro recorder turned on. That will give you
some good sample code to start with.

--
Regards,
Tom Ogilvy


"norrislaketn" wrote:

Is there an easy method to select multiple page area values to populate a
pivot table.

Example: A page area named "state" would list all 50 states but in a macro I
only want the states of Georgia and Tennessee. I do not want the user to have
to manually select. Just use a command button.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Pivot Table Page Area selections in a macro

Tried that and also tried adding the selection manually,see below.

Sheets("Rpt").PivotTables("PivotTable1").PivotFiel ds("Area").CurrentPage =
"GEORGIA", "TENNESSEE"

It is only returning the first states data.

"Tom Ogilvy" wrote:

Try doing it manually with the macro recorder turned on. That will give you
some good sample code to start with.

--
Regards,
Tom Ogilvy


"norrislaketn" wrote:

Is there an easy method to select multiple page area values to populate a
pivot table.

Example: A page area named "state" would list all 50 states but in a macro I
only want the states of Georgia and Tennessee. I do not want the user to have
to manually select. Just use a command button.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Pivot Table Page Area selections in a macro

I couldn't record anything like that.

Are you working with OLAP data? If not, what is your data source? Excel
sheet, access database, what?

--
Regards,
Tom Ogilvy


"norrislaketn" wrote:

Tried that and also tried adding the selection manually,see below.

Sheets("Rpt").PivotTables("PivotTable1").PivotFiel ds("Area").CurrentPage =
"GEORGIA", "TENNESSEE"

It is only returning the first states data.

"Tom Ogilvy" wrote:

Try doing it manually with the macro recorder turned on. That will give you
some good sample code to start with.

--
Regards,
Tom Ogilvy


"norrislaketn" wrote:

Is there an easy method to select multiple page area values to populate a
pivot table.

Example: A page area named "state" would list all 50 states but in a macro I
only want the states of Georgia and Tennessee. I do not want the user to have
to manually select. Just use a command button.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Pivot Table Page Area selections in a macro

SQL Server database

"Tom Ogilvy" wrote:

I couldn't record anything like that.

Are you working with OLAP data? If not, what is your data source? Excel
sheet, access database, what?

--
Regards,
Tom Ogilvy


"norrislaketn" wrote:

Tried that and also tried adding the selection manually,see below.

Sheets("Rpt").PivotTables("PivotTable1").PivotFiel ds("Area").CurrentPage =
"GEORGIA", "TENNESSEE"

It is only returning the first states data.

"Tom Ogilvy" wrote:

Try doing it manually with the macro recorder turned on. That will give you
some good sample code to start with.

--
Regards,
Tom Ogilvy


"norrislaketn" wrote:

Is there an easy method to select multiple page area values to populate a
pivot table.

Example: A page area named "state" would list all 50 states but in a macro I
only want the states of Georgia and Tennessee. I do not want the user to have
to manually select. Just use a command button.

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
Enable the page area only of a pivot table for protected worksheet TofTaf 63 Excel Discussion (Misc queries) 0 July 1st 09 09:09 AM
How do I prevent access to other page area in pivot table report? kedahboy Excel Discussion (Misc queries) 5 October 25th 07 01:40 AM
Pivot Table Page Field Area Broken GarethG Excel Discussion (Misc queries) 1 September 29th 05 10:11 PM
Multiple selection in the page area of a pivot table svlach Excel Discussion (Misc queries) 0 March 10th 05 03:33 PM
I cannot drag a Pivot Table field into the page area KimboR Excel Discussion (Misc queries) 2 February 23rd 05 02:29 PM


All times are GMT +1. The time now is 02:20 AM.

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"