John, this might work for you. This assumes your criteria is in cell A1 (what you want to filter for), and your data is in column B starting in row 2. You don't want to start your data in row 1, since row 1 may get hidden (along with your criteria cell) if it doesn't equal the criteria value.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1") = "" Then
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Else
Worksheets("Sheet1").Range("B:B").AutoFilter _
field:=1, _
Criteria1:=Range("A1").Value, _
VisibleDropDown:=False
End If
End Sub
This updates anytime you change the criteria in cell A1. It even shows all your data if you change the value in A1 to nothing (blank).
Bookmarks