Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enable the page area only of a pivot table for protected worksheet | Excel Discussion (Misc queries) | |||
How do I prevent access to other page area in pivot table report? | Excel Discussion (Misc queries) | |||
Pivot Table Page Field Area Broken | Excel Discussion (Misc queries) | |||
Multiple selection in the page area of a pivot table | Excel Discussion (Misc queries) | |||
I cannot drag a Pivot Table field into the page area | Excel Discussion (Misc queries) |