Replace getpivotdata's "#REF!" with "0"?

G

Guest

I am linking a spreadsheet to a pivot table. I am using getpivotdata to return a value for the total of an account, that may or may not be in the pivot table. One month the account may have a balance, the next month it may not. When it does not have a balance it will not show up in my pivot table, in this instance it will return #Ref! to my spreadsheet. This is the correct response; however, can I do something like "IF getpivitdata ='s #Ref! , return 0.
My spreadsheet can add 0's but it can't add #Ref!'s
 
D

Debra Dalgleish

You can use the ISERROR function:


=IF(ISERROR(GETPIVOTDATA("Units",$A$3,"Item","Pencils")),"",GETPIVOTDATA("Units",$A$3,"Item","Pencils"))
 

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