.
The macro works, when you type anything - anywhere in the sheet.
An alternative would be to use a Command Button and place the macro into a Routine Module. Then when you want to hide
all the non-Yes rows, you click the button. See attached file.
Option Explicit
Sub HideNotYes()
Application.ScreenUpdating = False
Dim C As Range
For Each C In Range("E3:E101").Cells
If C.Value <> "Yes" Then
C.EntireRow.Hidden = True
Else
C.EntireRow.Hidden = False
End If
Next C
Application.ScreenUpdating = True
End Sub