Hi everyone. I'm trying to simulate an interactive "dashboard" in Excel where double clicking specific ranges will Autofilter different parameters on another sheet.
My different double click events look like this:
1.
2.
I'll have a lot of them. Ballpark ~20 ish on this one sheet. Does anyone have a method for doing this?
I have it semi working linked together using a solution like this: BeforeDoubleClick Event with multiple ranges
However the main issue with this method is that the filter doesn't reset properly between each doubleclick event. For reasons I'm unsure of, when a filter returns 0 values, it won't properly reset to "ShowAllData" when you do another double click event so that filter will not return values even if there are.
My different double click events look like this:
1.
VBA Code:
If Not Intersect(Target, Range("L7:L166")) Is Nothing Then
Dim Goal As String
Goal = "*" & Cells(Target.Row, 7) & "*"
On Error Resume Next
Sheets("Details").ShowAllData
Sheets("Details").UsedRange.AutoFilter field:=12, Criteria1:="Open"
Sheets("Details").UsedRange.AutoFilter field:=1, Criteria1:=Goal
Sheets("Details").Activate
End If
2.
VBA Code:
If Not Intersect(Target, Range("M7:M166")) Is Nothing Then
Dim Goal As String
Goal = "*" & Cells(Target.Row, 7) & "*"
On Error Resume Next
Sheets("Details").ShowAllData
Sheets("Details").UsedRange.AutoFilter field:=1, Criteria1:=Goal
Sheets("Details").Activate
End If
I'll have a lot of them. Ballpark ~20 ish on this one sheet. Does anyone have a method for doing this?
I have it semi working linked together using a solution like this: BeforeDoubleClick Event with multiple ranges
However the main issue with this method is that the filter doesn't reset properly between each doubleclick event. For reasons I'm unsure of, when a filter returns 0 values, it won't properly reset to "ShowAllData" when you do another double click event so that filter will not return values even if there are.