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
Bookmarks