+ Reply to Thread
Results 1 to 5 of 5

VBA filter columns of pivot table.

  1. #1
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    VBA filter columns of pivot table.

    Hello friends! Hope 2017 is good to you all!

    I have the following code; it filters the column and shows the results of Sep-16. I am also trying to display the column “Oct-16”.

    But, Oct-16 is not appearing. Please help and thanks a lot in advance!

    Please Login or Register  to view this content.
    Last edited by zbor; 01-02-2017 at 05:27 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,404

    Re: VBA filter columns of pivot table.

    Use / not \ for code tags like: [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] or just select your code and click the # icon at the top of your post window.

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,785

    Re: VBA filter columns of pivot table.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Cheers!
    Deep Dave

    www.NeedForExcel.com

  4. #4
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Re: VBA filter columns of pivot table.

    thanks! the attachment is placed here. ok in the column field I see many choices, I only want the VB code to Display Sep-16 & Oct-16 as two columns (side-by-side).
    Attached Files Attached Files
    Last edited by countryfan_nt; 01-02-2017 at 06:19 AM.

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,785

    Re: VBA filter columns of pivot table.

    Try this. Put the months to filter in Variables Value1 & Value2

    Please Login or Register  to view this content.
    If you want to add another filter, add another variable, say for e.g. Value3 and add it between the FOR Each Loop
    Please Login or Register  to view this content.
    Last edited by NeedForExcel; 01-02-2017 at 07:54 AM.

+ 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. Print Button that removes columns before printing from custom pivot table filter
    By TheWhiteJamal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2015, 11:14 AM
  2. VBA filter date in multiple pivot table columns
    By kahnailee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2015, 10:35 AM
  3. Replies: 6
    Last Post: 07-31-2014, 12:56 PM
  4. Replies: 2
    Last Post: 07-30-2014, 05:50 AM
  5. Unwanted filter columns display in Pivot Table created by VBA
    By apo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2013, 05:47 AM
  6. Pivot table, assigning a cell wo be change the Pivot table filter
    By jwongsf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2012, 05:00 PM
  7. Change Pivot table Filter Based on Cell Value *Multiple Filter items* Possible?
    By Flydd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2012, 06:57 AM

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