Private Sub Worksheet_Change(ByVal Target As Range)
Dim derlig&, idx&, i&
Application.ScreenUpdating = False
If Target.Address(0, 0) <> "B2" Then Exit Sub
If Target = "" Then Me.UsedRange.Rows.EntireRow.Hidden = False: Exit Sub
derlig = Me.UsedRange.Row + Me.UsedRange.Rows.Count - 1
idx = 3 + Application.Match(Target, Range("d4:f4"), 0)
For i = derlig To 5 Step -1: Cells(i, 1).EntireRow.Hidden = Cells(i, idx) <> "x": Next i
End Sub