Sub change1()
Application.EnableEvents = False '///ajout
'Application.ScreenUpdating = False
ActiveSheet.Unprotect
Application.DisplayAlerts = False 'messages excel
Application.DisplayStatusBar = True ' info avancement macro dans barre d'infos en bas écran
Application.StatusBar = "Synthèse PEPS en cours"
Application.ScreenUpdating = False 'rafraichissement ecran (pour ne pas voir défiler les macros)
Application.Cursor = xlWait 'sablier
Application.Calculation = xlCalculationManual ' supprime calcul auto EXCEL pour gagner du temps. A remettre dans fin_sub
Rows("2:2").EntireRow.Hidden = False
If Range("b1").Value = "0" Then Rows("2:14").EntireRow.Hidden = True
If Range("b1").Value = "<0" Then Rows("2:2").EntireRow.Hidden = False
Rows("3:14").EntireRow.Hidden = False
If Range("b2").Value = "0" Then Rows("3:14").EntireRow.Hidden = True
If Range("b2").Value = "1" Then Rows("4:14").EntireRow.Hidden = True
If Range("b2").Value = "2" Then Rows("6:14").EntireRow.Hidden = True
If Range("b2").Value = "3" Then Rows("6:14").EntireRow.Hidden = True
If Range("b2").Value = "4" Then Rows("6:14").EntireRow.Hidden = True
Rows("6:14").EntireRow.Hidden = False
If Range("b3").Value = "0" Then Rows("6:14").EntireRow.Hidden = True
If Range("b3").Value = "700" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "701" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "702" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "704" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "4670" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "46100" Then Rows("7:14").EntireRow.Hidden = True
Rows("7:14").EntireRow.Hidden = False
If Range("b6").Value = "0" Then Rows("7:14").EntireRow.Hidden = True
If Range("b6").Value = "4" Then Rows("7:7").EntireRow.Hidden = True
If Range("b6").Value = "4" Then Rows("13:13").EntireRow.Hidden = True
If Range("b6").Value = "7" Then Rows("7:7").EntireRow.Hidden = True
If Range("b6").Value = "7" Then Rows("13:13").EntireRow.Hidden = True
If Range("b6").Value = "17" Then Rows("7:7").EntireRow.Hidden = True
If Range("b6").Value = "17" Then Rows("13:13").EntireRow.Hidden = True
Rows("12:14").EntireRow.Hidden = False
If Range("b11").Value = "0" Then Rows("12:14").EntireRow.Hidden = True
If Range("b11").Value = "1" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "2" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "3" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "4" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "5" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "6" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "7" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "8" Then Rows("13:13").EntireRow.Hidden = True
If Range("B2").Value = 0 Then
Range("B5, C5, D5 , B11, B3, B6").Value = 0
End If
If Range("B2").Value = 1 Then
Range("C3, D3, E3, B5, C5, D5").Value = 0
Range("C3, D3, E3").Locked = True
End If
If Range("B2").Value = 2 Then
Range("D3, E3, D5, C5").Value = 0
Range("D3, E3, C5, D5").Locked = True
End If
If Range("B2").Value = 3 Then
Range("E3, D5").Value = 0
Range("E3, D5").Locked = True
End If
Application.DisplayAlerts = True
Application.StatusBar = "Synthèse OK"
Application.ScreenUpdating = True 'rafrfraichissement ecran
Application.Cursor = xlDefault 'sablier
Application.Calculation = xlCalculationAutomatic
ActiveSheet.Protect
'Application.ScreenUpdating = True
Application.EnableEvents = True '///ajout
End Sub