I have a dashboard with data slicers on a worksheet called "Charts" and then on another worksheet called "DT_Summary" that has 7 pivot tables running vertically in columns D150:E400.
I also have a table in DT_Summary ranging from A1:B100 that has a static list of all of my Downtime reasons, and a sumif in column B to sum up all pivot values between E150:E400.
I am trying to make the VBA refilter B1 of my table on DT_Summary to all values greater than zero, so that my chart on sheet "Charts" only displays downtime reason with > 0 downtime when the date slicers are adjusted.
I've tried recording a macro and applying other solutions but can not figure this out. I've tried putting the Worksheet_Change code below on the Charts sheet and reference the DT_Summary table and also just have tried it on the DT_Summary table. Can anyone tell me what I am doing wrong or how to fix? Thank you
```
```
I also have a table in DT_Summary ranging from A1:B100 that has a static list of all of my Downtime reasons, and a sumif in column B to sum up all pivot values between E150:E400.
I am trying to make the VBA refilter B1 of my table on DT_Summary to all values greater than zero, so that my chart on sheet "Charts" only displays downtime reason with > 0 downtime when the date slicers are adjusted.
I've tried recording a macro and applying other solutions but can not figure this out. I've tried putting the Worksheet_Change code below on the Charts sheet and reference the DT_Summary table and also just have tried it on the DT_Summary table. Can anyone tell me what I am doing wrong or how to fix? Thank you
```
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Sheets("DT_Summary").Select
ActiveSheet.ListObjects("Table3").Range.AutoFilter Field:=2, Criteria1:= _
">0", Operator:=xlAnd
Application.EnableEvents = True
End Sub