"Best Practices" Use of GetPivotData Function

J

Johnny Meredith

Hello all,

Couldn't find this discussed, although I did find some discussion of
GetPivotData generally...

Note: Excel 2002 & 2003; working with financial data; beware the line
wrap on formulas

I use the following formula to pull data from a PivotTable A LOT:

=IF(ISERROR(GETPIVOTDATA(XXX Stuff here XXX)),0,GETPIVOTDATA(XXX Stuff
here XXX))

Works great. I'm wondering if there is a more elegant way to test the
the GETPIVOTDATA function for errors before I commit to pulling the
value. In the above formula, GETPIVOTDATA will always be evaluated
twice, or at least it does when ISERROR is FALSE, not sure if both are
evaluated when TRUE. Should I use this formula instead:

=IF(ISERROR(GETPIVOTDATA(XXX Stuff here XXX))=FALSE,GETPIVOTDATA(XXX
Stuff here XXX),0)

I always want a 0 when there is an error. It's less confusing to the
user (most of the time the user will recognize the 0 as an error when
the function is in context on a report; I know the 0 route is less
conservative from a validation point of view).

Any thoughts.

Thanks,
Johnny
 

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