GETPIVOTDATA if column doesn't exist

  • Thread starter Thread starter neotokyo
  • Start date Start date
N

neotokyo

Hi all!

Lets say I have a Pivot table with the top being :
Apples Oranges Pears

and the side column being :
Bill
Bob
Joe
Total

To total it, I use
GETPIVOTDATA(table, "Total Orange")+GETPIVOTDATA(table, "Tota
Apple")+GETPIVOTDATA(table, "Total Pears")


The problem is, sometimes one of the columns will have no data(o
change), and therefore be missing from the Pivot table. When thi
happens, the GETPIVOTDATA will return a N/A(even when the other
coumns have data).

Any ideas how to change this so that it adds a 0 instead of just
N/A?
eg. if apples is 0, I want GETPIVOTDATA cell to add 3+0+2=5, instead o
showing N/A.

Keep in mind, my real table has like 30 columns, so using IF statement
would be really tedious.

Any ideas??


THANKS!
 
I don't know of any way, other than IF formulas, to return a zero
instead of an error in your example. You may be able to reduce the
tedium if you can use cell references in the formulas, instead of text
strings. For example, GETPIVOTDATA(table, "Total " & G3)
 
Back
Top