+ Reply to Thread
Results 1 to 2 of 2

Filter Pivot Table between dates referenced in cell

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    Houston TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Filter Pivot Table between dates referenced in cell

    Hello all,

    I am new to the forum and this is my first post. I have searched the internet and this forum for something similar but every thread regarding filtering by dates doesn't quite work how I'm needing it to.

    I have a pivot table on a sheet named "pivot", and would like to filter the table by the row labels "GAS_DAY" --> date filters, between two dates.

    These two dates are referenced in cell B38 and B39 on sheet "Data" for the start and ends dates.

    When I record a macro, I have to hard code in a date ex: 1/1/2010 for the values as shown below:

    ActiveSheet.PivotTables("PivotTable2").PivotFields("GAS_DAY").PivotFilters.Add _
    Type:=xlDateBetween, Value1:="1/1/2010", Value2:="2/1/2010"


    Is there a way to replace Value1 and Value2 with cell references instead of hard values?

    Thanks,

    TK

  2. #2
    Registered User
    Join Date
    08-05-2013
    Location
    Houston TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Filter Pivot Table between dates referenced in cell

    Is what I am asking even possible?

+ 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. 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. 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
  3. 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
  4. Auto update pivot table filter dates
    By kaitco in forum Excel General
    Replies: 5
    Last Post: 11-19-2010, 01:40 PM
  5. Replies: 0
    Last Post: 05-12-2010, 05:01 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