Filtering on a pivot by dates (with some constraints)

Gringoire

Board Regular
Joined
Nov 18, 2016
Messages
71
Office Version
  1. 365
Platform
  1. Windows
Hello guys,
sorry if my question could be dummy but I'm new in handling pivot tables by VBA.

Here is my situation:
  1. I have a large table as source (more than 100,000 cells) where a column ("DATE_REG") contains the orders date spreaded along two or three years.
  2. I do not want to include the DATE_REG as a field to avoid introducing hundreds of unrequested rows or columns in the pivot table.
  3. I do not want to use a timeslicer because my filter must work from day to day on a timescale of years (the sliding bar become really huge).
  4. I would like avoid using three timeslicer (year, month, days) because it is confusing and not ergonomic
  5. I would also like to avoid, if possible, the DATE_REG as a pagefield because an endless list of dates is almost unusable.
Question 1: if I'm not wrong there is no way to filter the pivot on dates without introducing DATE_REG in the pivot as some kind of field. Is it correct?

Question 2: if the only workaround is to include DATE_REG as a pagefield how can I filter it through its .CurrentPage property? .CurrentPage seems to accept only single values like
VBA Code:
ActiveSheet.PivotTables("Pivot1").PivotFields("DATA_REG").CurrentPage = "02/11/22"
and not ranges.

every suggestion is welcome.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top