bonjour et merci Yvouille de votre aide
voila j ai tester et cela ne correspond pas tout a fait a mes besoins mais heureusement j'ai trouver quelque qui correspond un peu plus sauf que sa ne s actualise pas ! (si j'enlève une date dans feuill1 ,la feuille calendrier ne change pas)
pourrai t on m'aider SVP ?
voici le code
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyVarLigne As Byte
Dim MyVarColonne As Byte
If Not Intersect([G7:M24], Target) Is Nothing And Target.Count = 1 Then
If IsDate(Target) = False Then Exit Sub
On Error Resume Next
MyVarLigne = 0
MyVarLigne = Application.WorksheetFunction _
.Match(CLng(CDate("01/" & Month(Target) & "/" & Year(Target))), Worksheets("CALENDRIER").Range("A1:A256"), 0) + 3
If MyVarLigne = 0 Then
MsgBox " la date n'existe pas sur la feuille calendrier"
Exit Sub
End If
On Error GoTo 0
Err = 0
MyVarColonne = 0
MyVarColonne = Application.WorksheetFunction _
.Match(CLng(CDate(Target)), Worksheets("CALENDRIER").Range("A" & MyVarLigne & ":AL" & MyVarLigne), 0)
If MyVarColonne = 0 Then
MsgBox " la date n'existe pas sur la feuille calendrier"
Exit Sub
End If
If Target.Column = 7 Then
Target.Interior.Color = 255
Worksheets("CALENDRIER").Cells(MyVarLigne + 1, MyVarColonne).Interior.Color = 255
ElseIf Target.Column = 3 Then
Target.Interior.Color = 65535
Worksheets("CALENDRIER").Cells(MyVarLigne + 1, MyVarColonne).Interior.Color = 65535
ElseIf Target.Column = 5 Then
Target.Interior.Color = 0
Worksheets("CALENDRIER").Cells(MyVarLigne + 1, MyVarColonne).Interior.Color = 0
End If
End If
merci