+ Reply to Thread
Results 1 to 1 of 1

Daily Pivot Filter based on Date range specified in cells

Hybrid View

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Daily Pivot Filter based on Date range specified in cells

    I am trying to have the vba update the filters of a pivot table to a specified date range (Start = F1 End = H1)

    Currently I can do it with manual dates, but not dates from a cell
    Dim PT As PivotTable
    Set PT = Sheets("WTDDATA").PivotTables("WTDDATAPIVOT")
        With ActiveSheet.PivotTables("WTDDATAPIVOT").PivotFields("ObservationDate")
            .PivotItems("9/30/2012").Visible = True
            .PivotItems("9/29/2012").Visible = True
            .PivotItems("9/28/2012").Visible = True
            .PivotItems("9/27/2012").Visible = True
    One issue is that it is possible one of the dates in the range is non exhistent (ex 9/01/2012-09/10/2012 filter range but there may be no data for 9/10/2012)


    Basically I am looking for something that would do this:
    Dim PT As PivotTable
    Set PT = Sheets("WTDDATA").PivotTables("WTDDATAPIVOT")
        With ActiveSheet.PivotTables("WTDDATAPIVOT").PivotFields("ObservationDate")
            .PivotItems("F1") through ("H1").Visible = True
    Any help would be greatly appreciated
    Last edited by vlady; 10-02-2012 at 01:25 AM. Reason: Not using Code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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