+ Reply to Thread
Results 1 to 3 of 3

Use Slicer to hide columns in table

  1. #1
    Registered User
    Join Date
    01-18-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Use Slicer to hide columns in table

    I have a table, where I am using slicers to filter the rows. However, I would also like to be able to use a slicer to hide or show the columns present in the table.

    I have attached an example sheet - in this example I would like an additional slicer where I could say select 'Teams' and 'Points' and only these columns would show in the table.

    Thanks in advance for your help

    David
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: Use Slicer to hide columns in table

    Process is well documented below.
    https://www.excelcampus.com/vba/hide...slicer-filter/
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,910

    Re: Use Slicer to hide columns in table

    Here is my take on it. I created a second pivot table with the column headers in Column V. I created a slicer for this.

    Then I made an update pivot event. This code goes through the selections in the pivot table and compares them to the headers in the table. If the item is "turned off" in the pivot table (slicer), it is hidden otherwise it is unhidden.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 12-14-2017, 02:04 PM
  2. hide group of sells using slicer
    By avt471 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2016, 09:20 PM
  3. How to Hide Slicer Members in Power Pivot
    By rv02 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-24-2015, 10:29 AM
  4. Replies: 5
    Last Post: 11-26-2014, 04:39 AM
  5. VBA code to hide filtered columns (simple table 5 rows / 6 columns wide)
    By e2010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2014, 02:41 PM
  6. Replies: 2
    Last Post: 07-30-2014, 05:50 AM
  7. Pivot Table - Hide Columns with No Data?
    By JayMW in forum Excel General
    Replies: 3
    Last Post: 09-11-2009, 06:09 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1