GETPIVOTDATA formula

miked1978

New Member
Joined
May 7, 2020
Messages
2
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
I have a pivot table on 1 tab and a table on another tab that references a cell in the pivot table. It works great but I need to be able to drag it down to the next cell but when I do it stays the same. I've read that I need to change it look at the references.

Original Formula
=iferror(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull","2618"),0)

BCWR_PrevWk is the field name in the pivot
Pivots is the name of the tab
$A$6 appears to be where the pivot starts
Hull is the row label
2618 is the hull number (this is what I think I need to change)

When I drag the formula down I have to change 2618 to 2619 for it to work properly. I have over 1000 of these so that becomes too time consuming

I changed the formula to these:
=iferror(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull",A$7),0)
=iferror(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull", & A$7 &),0)
=iferror(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull", "& A$7 &"),0)

but I get a #REF error.

Any help would be greatly appreciated
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi, if A7 contains the value 2618 and A8 contains 2619 - then you can try this copied down.

=IFERROR(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull",A7&""),0)
 
Upvote 0
Hi, if A7 contains the value 2618 and A8 contains 2619 - then you can try this copied down.

=IFERROR(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull",A7&""),0)

It works!!!

I really appreciate it!!!
 
Upvote 0
Sorry for repeating the obvious, previous reaction were not loaded in time.

=iferror(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull","2618"),0)
=iferror(GETPIVOTDATA(" BCWR_PrevWk",Pivots!$A$6,"hull",A$7),0)

Those red parts need to be the same format. Could it be, in the pivot it is TEXT and in your range it is a VALUE (number) or vice versa.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

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