Results 1 to 8 of 8

VBA code to filter on Specific two dates ( pivot table)

Threaded View

  1. #1
    Registered User
    Join Date
    05-20-2014
    Posts
    9

    VBA code to filter on Specific two dates ( pivot table)

    Hi, I am trying to Auto filter on a pivot table "dates" via VBA coding.

    Sub test()
    
    Sheet5.Pivottables("PivotTable5").PivotFields("Date Range").PivotFilters. _
            Add Type:=xlDateBetween, Value1:=Range("Startdaycomp"), Value2:=Range("FinishDaycomp")
    
    End Sub
    Where:
    Startdaycomp = 11-May
    Finishdaycomp = 18-May

    Rather then this showing all values between these dates, I was hoping to see only those two dates. This will enable my to compare weekdays for a Dashboard.

    Is this possible?

    Thank you.

    Regards,
    Tejal S
    Last edited by alansidman; 06-20-2014 at 09:19 PM. Reason: code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Why my Pivot Table Filter shows individual dates
    By chico.corrales in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-28-2016, 05:52 AM
  2. Select Multiple Dates In Report Filter Pivot Table But Dates Are Not Static
    By biasedobserver in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2014, 03:38 PM
  3. Filter Pivot Table between dates referenced in cell
    By tkleypas13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2013, 04:42 PM
  4. Pivot table filter by specific day of the month
    By vesapo in forum Excel General
    Replies: 2
    Last Post: 11-29-2010, 02:44 PM
  5. Auto update pivot table filter dates
    By kaitco in forum Excel General
    Replies: 5
    Last Post: 11-19-2010, 01:40 PM

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