View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Enrico Campidoglio[_2_] Enrico Campidoglio[_2_] is offline
external usenet poster
 
Posts: 5
Default GetPivotData with column grand totals

I tried both:
=GETPIVOTDATA(A1, "Result P")
=GETPIVOTDATA(A1, "Grand Total P")

but I still get #N/A. I noticed though that the above works when there is
only 1 value in the result column i specify in the formula (either P or F).

It seems to me that this formula's behaviour is not really stable, at least
not in Excel 2000 which I am using right now. I read about other users
reporting problems with it.

The reason I started to use it in the first place was to retrieve the totals
from the pivot table into another worksheet. First I thought about simply
doing it in VBA but then I was suggested to use this formula which looked
like a much better solution to me. Anyway I sure wasn't expecting it to be so
complicated...

Do you have any suggestions?

--
Thanks in advance
/Enrico


"Jim Thomlinson" wrote:

Try this. GetPivot Data can refenece more than one dimension iun the second
argument...

=GETPIVOTDATA(A1, "Result F")
--
HTH...

Jim Thomlinson


"Enrico Campidoglio" wrote:

Hi!

I have a pivot table with the following layout:
[Count of results]
[Status] [Result]
P F Grand Total
A 10 3 13
B 15 8 23
C 5 4 9
Grand Total 30 15 45

A1 = [Count of results]

i am using the GetPivotData function to retrieve the grand totals but i can
only
retrieve the row grand totals (13, 23, 9) and not the column grand totals
(30, 15, 45).
Here is what i tried:
=GETPIVOTDATA(A1, "A") -- 13
=GETPIVOTDATA(A1, "Result") -- 45
=GETPIVOTDATA(A1, "P") -- #N/A
=GETPIVOTDATA(A1, "F") -- #N/A

I have tried using cell references but it doesn't make any difference.
I read many different how-tos about this function but the only solution i
found assumed the presence of column sub-totals.

What am i doing wrong? Help is appreciated

--
Thanks in advance
/Enrico