To describe filters, this article shows a screenshot of a label filter on a column where items are classified in groups (drinks, food, non-consumable):

Figure 1. PivotTable report showing filter states where Drink is mixed, Food is checked, and Non-Consumable is cleared

enter image description here

Right now I'm not interested in the article, just that grouping of items in the screenshot. What is this feature called, and how does it work? Is it customizable, can I arrange my data so that a PivotTable filter presents a tree view like that? Is it related to database back-ends or local to the workbook?



This is a Treeview control which may appear on a user form with Excel 2007 or later, VB.NET and C#.NET.

I have tried one with C# and it was as powerful as you would expect. In your example, you would add "Drink", "Food" and "Non-Consumable" to the Treeview as nodes. You would then add "Alcoholic Beverages", Beverages" and "Dairy" to "Drink" as nodes. You could then add "Beer", "Wine" and "Spirits" to "Alcoholic Beverages" as nodes. Check boxes, as used in your example, are optional.

The user can scroll up and down the tree, expanding or collapsing nodes as desired and selecting or deselecting nodes.

I have not tried a Treeview with Excel but I have find no mention on the web that one can be loaded with data other than via VBA.

The best article on using one with Excel 2007 that I have found is: Using a Treeview Control

  • Thanks. I thought it was some excel feature I missed out on. Interesting idea to extend filtering functionality of an Excel PivotTtable nonetheless. – mtone Jan 15 '12 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.