GETPIVOTDATA with INDIRECT

MagnusT

New Member
Joined
Jun 17, 2008
Messages
9
Hi All,

I got a slight problem with Getpivotdata and using indirect. The original formula is:

=+GETPIVOTDATA("Sum of Month 2008 Act",SAGE!$B$64,"Week",Y3)

I now try to use indirect to make "Sum of Month 2008 Act" variable

I have inputted in cell A1 "Sum of Month 2008 Act" and reworked the formula as below but get a #ref error

=+GETPIVOTDATA(Indirect(A1), SAGE!$B$64,"Week",Y3)

Anyone got an idea what I'm doing wrong.

Cheers
Magnus
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,836
Office Version
  1. 2019
Platform
  1. Windows
Hi,
The proper syntax needs quotes I think: INDIRECT("F3").
However, it doesn't seem to work either!

These both worked for me adding TEXT() to the formula too:
=GETPIVOTDATA(TEXT($F$3,"@"),$A$3,"b","x")
=GETPIVOTDATA(TEXT(INDIRECT("F3"),"@"),$A$3,"b","x")

GetPivotData is just a finicky little formula, that's all...

Alex.
 
Upvote 0

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,358
Office Version
  1. 365
Platform
  1. Windows
Magnus

You shoudn't need INDIRECT.

I mean you aren't using it for Y1.

If anything you might need to wrap A1 in quotes, I don't think you'll need that either.

""" & A1 & """
 
Upvote 0

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,836
Office Version
  1. 2019
Platform
  1. Windows
Hi Norie, I tried the concat with the quotes and was surprised it didn't work. I think its something about datatyping since there's a SQL engine doing something internally (i.e., Either you get a numeric value, or if you put it in quotes as text it probably reads the text with the quotes as the text...don't know why but the text function seems to overcome this issue. Maybe concat with a text marker would work too ... ? ... not sure)
 
Upvote 0

Forum statistics

Threads
1,191,517
Messages
5,987,057
Members
440,074
Latest member
Emmanuelian

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