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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
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
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
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,214,858
Messages
6,121,956
Members
449,057
Latest member
FreeCricketId

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