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 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago