Hide Pivot Table Column if Total Sum is Zero

S

Scott

Hello All,

I'm having a bit of difficulty trying to get this to work. Could
someone provide an example or advice? I've seen a couple similar topics
but I can't seem to get anything to work.

My pivot table is structured as:
one column field, "Code" with values of X,Y,Z
two data fields, "Pcs" and "Ordered Pcs"
one calculated field "Pcs minus Ordered Pcs"
one row with Company Name

So it looks something like:
Code
X Y Z
Company A Pcs 10 15 20
Ordered Pcs 5 0 6
Pcs minus Ordered Pcs 5 15 14

Company B Pcs 12 10 10
Ordered Pcs 6 0 5
Pcs minus Ordered Pcs 6 10 5

Total Pcs 22 25 30

Total Ordered Pcs 11 0 11
Total Pcs minus Ordered Pcs 11 25 19


What I would like to do using VBA is to hide the column if "Total
Ordered Pcs" = 0. So, in this example, it would be column "Y".

How can I do this? Thanks...and I love these groups!
 

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