MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 2nd, 2002, 11:49 PM   #1
Brian
 
Join Date: Apr 2002
Posts: 113
Default

GetPivotData - Can't retrieve the subtotals.

In the Excel97 help example, how would I get "March Total Beverages"?

In my PT, it says Sum instead of Total, but I have tried every combination of the column heading and subtotal heading and the words "sum" "sum of" and "total", but I can't retrieve the subtotals. It's driving me nuts.

ex.
WK10
SYS10 MACH1 5
MACH2 10
SYS10 Sum 15
SYS20 MACH1 50
MACH2 100
SYS20 Sum 150
Grand Total 165

How to I get
"SYS10 Sum WK10" = 15
"SYS20 Sum WK10" = 150

I get either #N/A! or #REF!, depending on what combinations I try.


Thanks in advance,

Brian


[ This Message was edited by: Brian on 2002-05-02 18:50 ]
Brian is offline   Reply With Quote
Old May 3rd, 2002, 05:36 AM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,647
Default

Quote:
On 2002-05-02 18:49, Brian wrote:
GetPivotData - Can't retrieve the subtotals.

In the Excel97 help example, how would I get "March Total Beverages"?

In my PT, it says Sum instead of Total, but I have tried every combination of the column heading and subtotal heading and the words "sum" "sum of" and "total", but I can't retrieve the subtotals. It's driving me nuts.

ex.
WK10
SYS10 MACH1 5
MACH2 10
SYS10 Sum 15
SYS20 MACH1 50
MACH2 100
SYS20 Sum 150
Grand Total 165

How to I get
"SYS10 Sum WK10" = 15
"SYS20 Sum WK10" = 150

I get either #N/A! or #REF!, depending on what combinations I try.


Thanks in advance,

Brian


[ This Message was edited by: Brian on 2002-05-02 18:50 ]
What formula did you try, which results in a #REF! error?
Aladin Akyurek is offline   Reply With Quote
Old May 3rd, 2002, 06:45 AM   #3
Brian
 
Join Date: Apr 2002
Posts: 113
Default

I've tried things like the following in every combination I could think of:

GetPivotData(PTname,"SYS10 Sum WK10")
GetPivotData(PTname,"SYS10 WK10")
GetPivotData(PTname,"SYS10 Sum of WK10")
GetPivotData(PTname,"WK10 SYS10")
etc.

GetPivotData(PTname,"March Total Beverages")
GetPivotData(PTname,"March Beverages")
GetPivotData(PTname,"March Sum of Beverages")

I would have expected the subtotals to be accessible.

Regards,

Brian
Brian is offline   Reply With Quote
Old May 3rd, 2002, 07:49 AM   #4
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,647
Default

Quote:
On 2002-05-03 01:45, Brian wrote:
I've tried things like the following in every combination I could think of:

GetPivotData(PTname,"SYS10 Sum WK10")
GetPivotData(PTname,"SYS10 WK10")
GetPivotData(PTname,"SYS10 Sum of WK10")
GetPivotData(PTname,"WK10 SYS10")
etc.

GetPivotData(PTname,"March Total Beverages")
GetPivotData(PTname,"March Beverages")
GetPivotData(PTname,"March Sum of Beverages")

I would have expected the subtotals to be accessible.

Regards,

Brian
Select an unused cell in the worksheet where your pivot table is, type =, select all of the cells of your pivot table, hit F9, copy what you see, and paste it here in the follow up. Hope the table is not too big.
Aladin Akyurek is offline   Reply With Quote
Old May 3rd, 2002, 03:27 PM   #5
Brian
 
Join Date: Apr 2002
Posts: 113
Default

Here is the pivot table:

Sum of hits WK
System task WK_11 WK_12 Grand Total
SYS11 an 2 4 6
SYS11 Sum 2 4 6
SYS21 gh 2 2
we 2 1 3
SYS21 Sum 2 3 5
an Sum 2 4 6
gh Sum 2 2
we Sum 2 1 3
Grand Total 4 7 11

Here is the variety of formulas:
=GETPIVOTDATA($A$3,A15)
WK_11 4
SYS11 #REF!
SYS11 Grand Total #REF!
SYS11 Sum #N/A
Grand Total 11
Sum of hits 11
WK_11 SYS11 #REF!
WK_11 Sum SYS11 #N/A
WK_11 Sum of SYS11 #N/A
WK_11 SYS11 Sum #N/A
SYS11 WK_11 #REF!
SYS11 Sum WK_11 #N/A
SYS11 Sum of WK_11 #N/A
SYS11 WK_11 Sum #N/A
SYS11 an WK_11 2
SYS21 we WK_12 1
an Sum #N/A
an Sum Grand Total #N/A
an Sum WK_11 #N/A

Thanks for you help,

Brian
Brian is offline   Reply With Quote
Old May 3rd, 2002, 03:41 PM   #6
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,647
Default

Here an example of what I wanted you to do:

{0,"Month",0,0,0;"Data",1,2,3,"Grand Total";"Sum of minutes",120,130,90,340;"Sum of USD",705,505,295,1505}

Created with the procedure I described to you.

The range of the above is: A3:E8, which I named PT2. And, also as en example,

=GETPIVOTDATA(PT2,"Sum of minutes 3")

gives me: 90.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 3rd, 2002, 04:48 PM   #7
Brian
 
Join Date: Apr 2002
Posts: 113
Default

Sorry, here it is:

{"Sum of hits",0,"WK",0,0;"System","task","WK_11","WK_12","Grand Total";"SYS11","an",2,4,6;"SYS11 Sum",0,2,4,6;"SYS21","gh",0,2,2;0,"we",2,1,3;"SYS21 Sum",0,2,3,5;0,"an Sum",2,4,6;0,"gh Sum",0,2,2;0,"we Sum",2,1,3;"Grand Total",0,4,7,11}
Brian is offline   Reply With Quote
Old May 3rd, 2002, 04:54 PM   #8
Brian
 
Join Date: Apr 2002
Posts: 113
Default

Hi,

How do I get you {} back into range A3:E8?

I tried various thing with enter, F9, and Ctrl-Shift-Enter, but no luck.

My range was A3:E13

Regards
Brian is offline   Reply With Quote
Old May 3rd, 2002, 05:21 PM   #9
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,647
Default

Quote:
On 2002-05-03 11:48, Brian wrote:
Sorry, here it is:

{"Sum of hits",0,"WK",0,0;"System","task","WK_11","WK_12","Grand Total";"SYS11","an",2,4,6;"SYS11 Sum",0,2,4,6;"SYS21","gh",0,2,2;0,"we",2,1,3;"SYS21 Sum",0,2,3,5;0,"an Sum",2,4,6;0,"gh Sum",0,2,2;0,"we Sum",2,1,3;"Grand Total",0,4,7,11}
Does this work:

=GETPIVOTDATA(PTname,"sys11 wk_11")

where PTname is the name of the report area?

Aladin Akyurek is offline   Reply With Quote
Old May 3rd, 2002, 07:08 PM   #10
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
Default

Quote:
On 2002-05-02 18:49, Brian wrote:
GetPivotData - Can't retrieve the subtotals.

In the Excel97 help example, how would I get "March Total Beverages"?

In my PT, it says Sum instead of Total, but I have tried every combination of the column heading and subtotal heading and the words "sum" "sum of" and "total", but I can't retrieve the subtotals. It's driving me nuts.

ex.
WK10
SYS10 MACH1 5
MACH2 10
SYS10 Sum 15
SYS20 MACH1 50
MACH2 100
SYS20 Sum 150
Grand Total 165

How to I get
"SYS10 Sum WK10" = 15
"SYS20 Sum WK10" = 150

I get either #N/A! or #REF!, depending on what combinations I try.


Thanks in advance,

Brian


[ This Message was edited by: Brian on 2002-05-02 18:50 ]
=GETPIVOTDATA(pivot_table,"SYS10 WK10") produces 15
=GETPIVOTDATA(pivot_table,"SYS20 WK10") produces 150

...where pivot_table is a reference to a cell in the PivotTable

[ This Message was edited by: Mark W. on 2002-05-03 14:16 ]
Mark W. is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On

Forum Jump


All times are GMT +1. The time now is 11:23 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes