can excel 2007 embed getpivotdata into a subtotal function?

jeffreyweir

Board Regular
Joined
Jul 3, 2007
Messages
110
Hi all. If I try to embed a getpivotdata function into a subtotal function in excel 2007, I get a dialogue box saying "the formula you typed contains an error..." and I cannot enter the formula.

What I'm trying to do is as follows:


Cell Q9 has the following GETPIVOTDATA formula, which works just fine:
=GETPIVOTDATA("Revenue",'SKU month Pivot'!$A$13,"Order Month/Year",N$5,"Parent Product",$B9,"Sales_Channel","Education")

Cell P10 has the following SUBTOTAL formula, which points to the abovementioned GETPIVOTDATA function, which works fine:
=SUBTOTAL(9,Q9)

However, when I try to amalgamate these into one formula, I get the dialogue box saying "the formula you typed contains an error..." and I cannot enter the formula as below:

=SUBTOTAL(9,GETPIVOTDATA("Revenue",'SKU month Pivot'!$A$13,"Order Month/Year",N$5,"Parent Product",$B9,"Sales_Channel","Education"))

Looks like a bug in 2007 to me. Any thoughts, anyone?
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I believe it's because unlike the SUM function which accepts numbers OR references, the SUBTOTAL function only accepts references (and I'm attempting to feed it a number via the GETPIVOTDATA function).

So I may have to have these functions in 2 different cells.

Any thoughts otherwise?
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,686
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top