Hello,
I'm trying to sort a table based on a drop-down menu in cell F2. The below code I found online works great, except when I change the drop-down to "all" I need it to show all records and it currently filters for text "all". Any thoughts? I feel like this is a quick fix- just can't quite figure it out...
Private Sub Worksheet_Change(ByVal Target As Range)
If (Intersect(Target, Range("F2")) ="All") _
Then
Exit Sub
End If
Cells.AutoFilter Field:=6, Criteria1:="=" & Range("F2")
End Sub
Thanks!
I'm trying to sort a table based on a drop-down menu in cell F2. The below code I found online works great, except when I change the drop-down to "all" I need it to show all records and it currently filters for text "all". Any thoughts? I feel like this is a quick fix- just can't quite figure it out...
Private Sub Worksheet_Change(ByVal Target As Range)
If (Intersect(Target, Range("F2")) ="All") _
Then
Exit Sub
End If
Cells.AutoFilter Field:=6, Criteria1:="=" & Range("F2")
End Sub
Thanks!