Pivot table - eliminate rows out of the table

A

aw

I have pivot table that already generated by macro.

And now get problem & need to solve.


Actually I have to hide our inter-company code that ‘may’ or ‘may not’
appear under my pivot table above.

We have all together Nine inter-company code but may not appear all the time
for each running of pivot table.

I try to hard code all these inter-co code under my VB, but got error if in
case no such inter-co code appear that time.

How I can solve this by searching the customer code to check whether they
are equal to my inter-company code & then to hide if it is true.


my pivot table structure (simpify)

Customer code Customer … Sum of Total
---------------------- --------------
-------------------


Also, here my coding by ‘recording’ function in VB, for hidden cust_code=blank

ActiveSheet.PivotTables("PivotTable1").PivotSelect "Cust_code['(blank)']", _
xlDataAndLabel, True
Selection.Delete
 

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