• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Slicer Items filter based on from and to cell value references (OLAP data)

JAYA TEJA

New Member
Hai
I need a small help in VBA coding
I need to filter Slicer Items based on 2 cell references (From and to)

Please share coding for sample attachment

It helps me a lot

Thanking you
 

Attachments

  • Test.xlsm
    41.2 KB · Views: 4
I am using OLAP database, I tried with below code, it was not working,
Can anyone help with this?

Code:
Sub Cliquer()
    Dim ar1
    Dim strConst As String
    strConst = "[Time].[Fiscal Day Of Year].&["
    ReDim ar1(1 To Cells(Rows.Count, "H").End(xlUp).Row - 1)
 
    For i = 1 To UBound(ar1)
        ar1(i) = strConst & Cells(i + 1, "H").Value2 & "]"
    Next
 
    ThisWorkbook.SlicerCaches("Slicer_Fiscal_Day_Of_Year").VisibleSlicerItemsList = ar1
End Sub
 
Last edited by a moderator:
Back
Top