I created a pivot table summarizing some accounting journal entries for the month by account number (eg. 1001). In a trial balance I am trying to retrieve the data from the pivot table using the getpivotdata function using the account number. This works as long as an amount exists in the pivot table otherwise it returns a #REF error.

Is there any way of returning a zero into the cell? Currently I manually go in and overwrite the formula with a zero.