Excel 2007 GetPivotData function

btardo01

Board Regular
Joined
Oct 6, 2009
Messages
169
Office Version
  1. 2016
Platform
  1. Windows
I have the following formula:

Code:
=GETPIVOTDATA("[Measures].[Agency Amt]",'DATA '!$A$3,"[Time].[Calendar]","[Time].[Calendar].[Year].&[2011].&[1]","[Major Line].[Consolidated Major Lines]","[Major Line].[Consolidated Major Lines].[Major Line Group Description].&[Commercial]","[New Renew].[New Ren]","[New Renew].[New Ren].&[1]","[Staff].[Staff Code]","[Staff].[Staff Code].&[TO]")

But here is my problem. Instead of the last item being [TO], I want it to refer to a cell, A13. How to I adjust the formula to look at a cell reference instead of a specific value. That way whenever the value in A13 changes, the formula results auto updates.

Secondly, is there a way to use a formula similar to the one above but instead of changing [TO] to a single cell reference, change it so that it looks at multiple cell references and performs more like a sum function on the pivot table. (so you'd basically be asking the pivot table to give you a sum based on values in multiple cells)

thanks in advance.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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