GET PIVOTDATA #REF! - Error

tomlinsn

Board Regular
Joined
Jan 25, 2011
Messages
74
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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi, does this small amendment help?

=GETPIVOTDATA("Amount",'2019'!$R$4,"Fund","1100","Orgn","2002","Acct",T8&"")
 
Upvote 0
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!!
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,593
Members
449,038
Latest member
Arbind kumar

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