Can an 'IF' function be added into a GETPIVOTDATA formula

crooser100

New Member
Joined
Dec 2, 2009
Messages
16
Hi there <?XML:NAMESPACE PREFIX = O /><O:P></O:P>
<O:P></O:P>
I'm trying to populate a master front sheet to automatically populate from my Pivot table once refreshed... <O:P></O:P>
<O:P></O:P>
However each week the data changes and some of the fields may disappear. Is there any way to include a string within the GETPIVOTDATA formula to say that ‘IF’ one of the fields doesn't apprear within the pivot, then return a 0?


Current formula:

<O:P></O:P>
<O:P>=GETPIVOTDATA("Exp Time
(mins)",Sheet1!R4C1,"Plant Area","Stillages","Frequency","Shiftly")
</O:P>

<O:P></O:P>
<O:P></O:P>
<O:P>The "stillages" part of the formula is the part that may not be available, i.e next week it would be laydown. Therefore if this is the case I would like to return the formula to return a 0 rather than a #REF as it corrupts all other formulas on the master. </O:P>
<O:P></O:P>
<O:P></O:P>
<O:P>Is it possible to do this?</O:P>

MAny thanks
Jo
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Try:

=IF(ISERROR(GETPIVOTDATA("Exp Time(mins)",Sheet1!R4C1,"Plant Area","Stillages","Frequency","Shiftly")),0,GETPIVOTDATA("Exp Time(mins)",Sheet1!R4C1,"Plant Area","Stillages","Frequency","Shiftly"))
<?XML:NAMESPACE PREFIX = O /><O:P></O:P>
<O:P></O:P>
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,492
Messages
5,832,010
Members
430,103
Latest member
BIGGAZ

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