Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [B1:B4]) Is Nothing Then Exit Sub
Application.ScreenUpdating = False 'les valeur par défaut
If Target.Address = "$B$1" And [B1] = "oui" Then
[B2] = "pressostatique"
[B2].Interior.ColorIndex = 3
End If
If Target.Address = "$B$2" And [B2] = "automate" Then
[B3] = "A"
[B3].Interior.ColorIndex = 3
End If
If Target.Address = "$B$2" And [B2] = "regulateur" Then
[B4] = "D"
[B4].Interior.ColorIndex = 3
End If
Rows("2:4").Hidden = [B1] <> "oui"
If [B2] = "pressostatique" Then Rows("3:4").Hidden = True
If [B2] = "automate" Then Rows(4).Hidden = True
If [B2] = "regulateur" Then Rows(3).Hidden = True
End Sub