Excel Filter in Pivot cube data
I need help, I want to filter date range of a Pivot table data from cube using begin date and end date field field in excel. I have tried some VBA code but no success.
I have attached sample file from CUBE
Script used
Public Sub MyFilter()
Dim lngStart As Long, lngEnd As Long
lngStart = Range("E1").Value 'assume this is the start date
lngEnd = Range("E2").Value 'assume this is the end date
Range("B4:V4").AutoFilter field:=1, _
Criteria1:=">=" & lngStart, _
Operator:=xlAnd, _
Criteria2:="<=" & lngEnd
End Sub
Note:
kindly help thank you.
Attachment | Size |
---|---|
Sample Data.xlsx | 9.01 KB |
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago