Bonjour à tous
Merci de bien vouloir m'aider
DAVYJ’ai un classeur excel nommé color avec 15 feuilles au format identique .
Je souhaiterai déclencher une suite de macros lorsque les 2 conditions ci-après sont remplies en même temps
Si C4 :J4 différent de E0 ,E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11
Et
SI C18 :J18 = OK
De plus la condition sur C4 est associée à la condition sur C18
la condition sur D5 est associée à la condition sur D18 ect
J’ai mis ce code au niveau de chaque feuille
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("C18:J18"), Range("C4:J4")) Is Nothing Then
BLENDER
End If
End Sub
2 modules BLENDER ET CONFORME
Sub BLENDER()
Dim Plage1 As Range
Dim C1 As Range
Application.ScreenUpdating = False
Set Plage1 = Range("C4:J4")
For Each C1 In Plage1
If C1.Value = "E0 " Then Exit Sub
If C1.Value = "E1 " Then Exit Sub
If C1.Value = "E2 " Then Exit Sub
If C1.Value = "E3 " Then Exit Sub
If C1.Value = "E4 " Then Exit Sub
If C1.Value = "E5 " Then Exit Sub
If C1.Value = "E6 " Then Exit Sub
If C1.Value = "E7 " Then Exit Sub
If C1.Value = "E8 " Then Exit Sub
If C1.Value = "E9 " Then Exit Sub
If C1.Value = "E10 " Then Exit Sub
If C1.Value = "E11 " Then Exit Sub
Next
CONFORME
Application.ScreenUpdating = True
End Sub
Sub CONFORME()
Dim Plage As Range
Dim C As Range
Application.ScreenUpdating = False
Set Plage = Range("C18:J18")
For Each C In Plage
If C.Value = "OK" Then
TEST
Else: Exit Sub
End If
Next
Application.ScreenUpdating = True
End Sub
TEST est une macro qui déclenche 5 macros différentes
Cela ne fonctionne pas car TEST NE se déclenche pas.
Merci de bien vouloir m'aider
DAVYJ’ai un classeur excel nommé color avec 15 feuilles au format identique .
Je souhaiterai déclencher une suite de macros lorsque les 2 conditions ci-après sont remplies en même temps
Si C4 :J4 différent de E0 ,E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11
Et
SI C18 :J18 = OK
De plus la condition sur C4 est associée à la condition sur C18
la condition sur D5 est associée à la condition sur D18 ect
J’ai mis ce code au niveau de chaque feuille
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("C18:J18"), Range("C4:J4")) Is Nothing Then
BLENDER
End If
End Sub
2 modules BLENDER ET CONFORME
Sub BLENDER()
Dim Plage1 As Range
Dim C1 As Range
Application.ScreenUpdating = False
Set Plage1 = Range("C4:J4")
For Each C1 In Plage1
If C1.Value = "E0 " Then Exit Sub
If C1.Value = "E1 " Then Exit Sub
If C1.Value = "E2 " Then Exit Sub
If C1.Value = "E3 " Then Exit Sub
If C1.Value = "E4 " Then Exit Sub
If C1.Value = "E5 " Then Exit Sub
If C1.Value = "E6 " Then Exit Sub
If C1.Value = "E7 " Then Exit Sub
If C1.Value = "E8 " Then Exit Sub
If C1.Value = "E9 " Then Exit Sub
If C1.Value = "E10 " Then Exit Sub
If C1.Value = "E11 " Then Exit Sub
Next
CONFORME
Application.ScreenUpdating = True
End Sub
Sub CONFORME()
Dim Plage As Range
Dim C As Range
Application.ScreenUpdating = False
Set Plage = Range("C18:J18")
For Each C In Plage
If C.Value = "OK" Then
TEST
Else: Exit Sub
End If
Next
Application.ScreenUpdating = True
End Sub
TEST est une macro qui déclenche 5 macros différentes
Cela ne fonctionne pas car TEST NE se déclenche pas.