GET PIVOTDATA #REF! - Error

tomlinsn

Board Regular
Joined
Jan 25, 2011
Messages
71
I want to use the GET PIVOTDATA function to reference data fromwithin a Pivotable. When I enter: =GETPIVOTDATA("Amount",'2019'!$R$4,"Fund","1100","Orgn","2002","Acct","5815"),I get the result of $15,589.15

I want the function to be dynamic and retrieve the informationdisplayed in the Acct field stored in cell T8 in the Pivot Table. When Ichange the function to =GETPIVOTDATA("Amount",'2019'!$R$4,"Fund","1100","Orgn","2002","Acct",T8)I get #REF!

What am I doing wrong? How do I fix this to keep it dynamic?

Thank you in advance for your help,
Tom
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,489
Office Version
  1. 365
Platform
  1. Windows
Hi, does this small amendment help?

=GETPIVOTDATA("Amount",'2019'!$R$4,"Fund","1100","Orgn","2002","Acct",T8&"")
 

tomlinsn

Board Regular
Joined
Jan 25, 2011
Messages
71
Hi - It does!! Perfect!! Now, please tell me why this works. I understand the & concatenate function, but I don't understand how the syntax of this work. Obviously needs 5815 inside the "".

Thank you so much!!
 

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,489
Office Version
  1. 365
Platform
  1. Windows
Hi, your value in T8 is a number, and the data in your pivot table is text. Appending a zero length string the number changes it to a text value.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,312
Messages
5,635,491
Members
416,860
Latest member
coen078

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
Top