#REF! in Pivot Table when Input Data is Deleted and Refreshed PT

johndrew

Board Regular
Joined
Apr 21, 2007
Messages
100
I have a macro delete the data information and refresh the Pivot Table, I get #Ref!

I am using a macro to delete the data and refresh and using Excel10

It happens when I don't use all the fields in the Design input Box. There are times when I don't use all the fields.
For example sometimes I may not have coins. The pivot table is looking for an entry in the coin field. I have my report getting the total from the Pivot Table and in my report is where the #ref! appears. I can't post an attachment to show you to help understand my problem.

This is for a church. I have checks, currency and coins, name, amount and the fund to apply in the Design Box.
It will work if I make a dummy entry for all fields, but then they appear in the report. I can make an entry for a name "no body" make 5 entries to include all fields and filter "nobody" out but was hoping there is a better way.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Name Type Fund Amount
Tom Check Tithe $11.00
Bill Currency Missions $22.00
Henry Coins Missions $33.00
Sam Check Building $44.00

I have Combo Boxes to enter Type and Fund
and a Pivot Table on the data, with a breakdown of Type
The original Pivot Tables gives me what I need
The Type totals are pulled in from the PT into Cells, D10 (Checks),D11(Currency) and D12(Coins)

The next Sunday, I delete the data and leave the PT the same
In cells D10,D11 and D12 I will have #Ref! until data is entered into the field categories.
If no entry is made into the original Type field, it will give the error.
If that category is used it works.

Example: if Checks is used again, D10 will give the total, if Coins is not used, a #Ref! will stay in D12 and my totals will not work.
I need something to remove the #Ref! in my report if there isn't any value entered for that category.
 
Last edited:
Upvote 0
=+GETPIVOTDATA("Amt",$F$10,"TYPE"," Check")
=+GETPIVOTDATA("Amt",$F$10,"TYPE"," Currency")
=+GETPIVOTDATA("Amt",$F$10,"TYPE","Coins")
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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
Back
Top