Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$B$1" Then Exit Sub
first = [MATCH(B1,C:C,)]
last = [IFERROR(MATCH("שם הסניף:",OFFSET(B1,MATCH(B1,C:C,),,9999),)+MATCH(B1,C:C,)-2,LOOKUP(9^9,A1:A9999,ROW(A1:A9999)))]
Rows("4:9999").Hidden = True
Rows(first & ":" & last).Hidden = False
End Sub