+ Reply to Thread
Results 1 to 2 of 2

Read colums passed the filter in pivot table by using vba

  1. #1
    Registered User
    Join Date
    01-05-2016
    Location
    Santiago
    MS-Off Ver
    2007
    Posts
    1

    Read colums passed the filter in pivot table by using vba

    Hello

    I'm trying to get the number of items and its names showed in the first column(s) which pased the filter of my pivot table, here Pas1, Pas3, Pas5, Pas8 and Pas9 and the corresponding dates (mar 2017, ...):
    pivottable.png

    With Worksheets("Stock").PivotTables("PivotTable").PivotFields I could get access to the fields of source table but I how can I get access to created, processed pivot table.
    How can I do that? Apreciate your answer!

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

    Re: Read colums passed the filter in pivot table by using vba

    First of all, I can't see your picture since PNG files don't show up in all browsers. Secondly, it would help a lot if you could post a sample spreadsheet. Third, posting the entire code would help.

    However, it looks like you are almost there. You need to drill down one more level to the PivotItem. Loop through the pivot item and check for pi.visible = True to see what names are visible.

    This is my go to source when I program pivot tables: http://peltiertech.com/referencing-p...ranges-in-vba/

+ 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. pivot table splitting different colums with same value
    By teddy1987 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-23-2015, 02:21 PM
  2. Pivot table - count data in 2 colums separately
    By soxes in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-08-2015, 08:08 PM
  3. Replies: 6
    Last Post: 07-31-2014, 12:56 PM
  4. Pivot table with 2 colums combined--- displayed together
    By Istirling in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-22-2013, 04:30 PM
  5. Adding additional colums in the pivot table
    By Excel Dumbo in forum Excel General
    Replies: 7
    Last Post: 08-21-2012, 04:00 AM
  6. read date and highlight if a month passed
    By pelachrum in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-28-2006, 10:22 PM
  7. pivot table - two colums of data are missing
    By JJ in forum Excel General
    Replies: 1
    Last Post: 08-04-2005, 03:05 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