GETPIVOTDATA using a reference for field name

R

Rayo K

Can this be done. I read some posts suggesting it could, but I get a REF
error. Here is my formula:

=GETPIVOTDATA(B20,BoardPivot!$A$3,"Shift",D20,"Year",Calculations!$B$15,"Month",Calculations!$B$14)

B20 is a cell containing:

=CONCATENATE("M ",A20," KPH")

and A20 is a three digit number.

"M 122 KPH" is an example. This is a calculated field. I am using Windows XP
and Office 2003.

It works when I enter the field name directly so it is almost certainly the
source of the error.
 
B

Barb Reinhardt

Have you tried

=GETPIVOTDATA(indirect(B20),BoardPivot!$A$3,"Shift",D20,"Year",Calculations!$B$15,"Month",Calculations!$B$14)
 
D

Debra Dalgleish

Add an empty string to the B20 reference:


=GETPIVOTDATA(B20&"",BoardPivot!$A$3,"Shift",D20,"Year",Calculations!$B$15,"Month",Calculations!$B$14)
 
R

Rayo K

Thanks. It actually didn't work, but I decided that I wouldn't need the
references to change so I just typed them in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top