Hide/filter columns using a drop down menu (Pivot Table) in Excel

Roze

New member
Joined
Aug 24, 2020
Messages
2
Reaction score
0
Points
0
Excel Version(s)
Excel 2016
Hi there,

I am looking for some help in problem solving and figuring out why the code I am using is failing to do what it is meant to do.

I have a master sponsorship tracking Excel document that will be used to track deliverables. We need to be able to filter (hide/view) columns so we can only see certain categories of columns at once, which we can select from a drop down menu.

The excel sheet contains roughly 180 columns with column headers. Above these headers is an additional row of headers that are to be used by the Pivot Table and the VBA code for filtering.

I copied an online guide on how to do this, found here: https://www.excelcampus.com/vba/hide-unhide-columns-slicer-filter/

The excel doc is attached here. The issue is that is it is not working and I do not know why. I would greatly appreciate your help.

Thank you!
 

Attachments

  • DRAFT - Master Sponsorship Programs.xls
    75.5 KB · Views: 6
Try the attached.
All columns were hidden because all pivot items were not visible in the pivot table as nothing was in the rows section of the pivot. I moved Filter from the page field (Filters section) to the rows section, now pivot items are actually visible in the pivot when you choose them.
No change to the code.
 

Attachments

  • ExcelGuru10774DRAFT - Master Sponsorship Programs.xls
    83.5 KB · Views: 6
Thank you so much! Problem is completely solved. I knew I was missing something obvious.
 
Back
Top