J'utilise la macro ci dessous. Comment la modifier pour qu'elle s'applique a certaines pages du classeur. Actuellement, elle ne fonctionne qu'avec la premiere. D'avance merci.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Range
For Each X In Range("C5:Q34")
If X.Value = "CA" Then X.Font.ColorIndex = 3
If X.Value = "JU" Then X.Font.ColorIndex = 3
If X.Value = "RTT" Then X.Font.ColorIndex = 5
If X.Value = "MED" Then X.Font.ColorIndex = 3
If X.Value = "TV" Then X.Font.ColorIndex = 3
If X.Value = "AN" Then X.Font.ColorIndex = 3
If X.Value = "linge" Then X.Font.ColorIndex = 1
If X.Value = "cuisine" Then X.Font.ColorIndex = 1
If X.Value = "week" Then X.Font.ColorIndex = 1
If X.Value = "linge/nuit" Then X.Font.ColorIndex = 1
If X.Value = "cuisine/nuit" Then X.Font.ColorIndex = 1
If X.Value = "x/nuit" Then X.Font.ColorIndex = 1
If X.Value = "astreinte" Then X.Font.ColorIndex = 1
If X.Value = "maladie" Then X.Font.ColorIndex = 50
If X.Value = "RH" Then X.Font.ColorIndex = 1
If X.Value = "FERIE" Then X.Font.ColorIndex = 1
If X.Value = "CE" Then X.Font.ColorIndex = 3
If X.Value = "x" Then X.Font.ColorIndex = 1
If X.Value = "C07" Then X.Font.ColorIndex = 3
Next X
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Range
For Each X In Range("C5:Q34")
If X.Value = "CA" Then X.Font.ColorIndex = 3
If X.Value = "JU" Then X.Font.ColorIndex = 3
If X.Value = "RTT" Then X.Font.ColorIndex = 5
If X.Value = "MED" Then X.Font.ColorIndex = 3
If X.Value = "TV" Then X.Font.ColorIndex = 3
If X.Value = "AN" Then X.Font.ColorIndex = 3
If X.Value = "linge" Then X.Font.ColorIndex = 1
If X.Value = "cuisine" Then X.Font.ColorIndex = 1
If X.Value = "week" Then X.Font.ColorIndex = 1
If X.Value = "linge/nuit" Then X.Font.ColorIndex = 1
If X.Value = "cuisine/nuit" Then X.Font.ColorIndex = 1
If X.Value = "x/nuit" Then X.Font.ColorIndex = 1
If X.Value = "astreinte" Then X.Font.ColorIndex = 1
If X.Value = "maladie" Then X.Font.ColorIndex = 50
If X.Value = "RH" Then X.Font.ColorIndex = 1
If X.Value = "FERIE" Then X.Font.ColorIndex = 1
If X.Value = "CE" Then X.Font.ColorIndex = 3
If X.Value = "x" Then X.Font.ColorIndex = 1
If X.Value = "C07" Then X.Font.ColorIndex = 3
Next X
End Sub