Archive of Mr Excel Message Board

Back to Forms in Excel VBA archive index
Back to archive home

GETPIVOTDATA function
Posted by John S. on February 13, 2001 6:16 AM
I need to know the correct way to get pivot data. EX:
Row: Apples,Red,Washington,
Data: Sum of Sales
I need to get the sum of the Red Apples Sales from this pivotdata using ref. cells
A1=Apples
B1=Red
getpivotdata(Pivot1,A1&" "&B1 Sum of sales)
this is not working. help thanks

| Check out our Excel Resources
|
 |
 |
Re: GETPIVOTDATA function
Posted by Mark W. on February 13, 2001 6:55 AM
John, if you leave "Washington" as a row item
you'll need to turn on Subtotals for your field
(Color?) that includes the "Red" and "Green" items.
Once you've done that you can use:
=GETPIVOTDATA(Pivot1,A1&" "&B1)
Alternately, you could eliminate the Subtotals
mentioned above and move the field (State?)
with the "Washington" item to the COLUMN area.

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.