VBA filter grand total if blanks, if not skip filter

txdude311

New Member
Joined
Jul 26, 2016
Messages
5
Hello,

I am trying to edit a macro with some pivot tables. I am extremely novice with VBA editing and I would be extremely appreciative of your help :). The macro creates a pivot table and grand totals for monthly data. Sometimes the grand total must be adjusted with filters. At times I need to filter out "(blank)" fields and other "credit" and "debit" fields. How can I filter these out of the pivot in the macro if they are present in the data and skip the filter if they are not so the macro runs without stalling. Attached is a photo of the fields that sometimes appear in the data. Thank you so much!

Imgur: The most awesome images on the Internet

qMKHW
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,732
Messages
6,126,540
Members
449,316
Latest member
sravya

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