Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Integer
Dim r As Integer
Dim cat As String
Dim fil As String
Dim sli As String
'Declare all variables
cat = Target.Offset(-2, 0).Value 'Get category (current cell -2 up)
With sCalc
*** r = .Range("B:B").Find(cat).Row 'Get category row in Calc ***
sli = .Cells(r, 4).Value 'Get slicer name
fil = .Cells(r, 5).Value 'Get filter name
End With
c = sAllRefs.Range("1:1").Find(fil).Column 'Get filter column in AllRefs
Set sc = ThisWorkbook.SlicerCaches(sli)
'Macro starts here