Bonjour Gyrus,
tout d'abord merci pour ton aide précieuse.
question : j'ai modifié la formule G2 (à la place de mois.décaler j'ai mis fin.mois) ce qui donne :
=SI(H2="Arrêt"; F2;FIN.MOIS(F2;H2)) faut il modifier la macro ? (je suis novice)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 8 Then
Application.ScreenUpdating = False
Application.EnableEvents = False
If Target = 0 Then
Application.Undo
Target.Offset(, -1) = Target.Offset(, -1).Value
Target = "Arrêt"
Else
Target.Offset(, -1).FormulaR1C1 = "=IF(RC[1]=""Arrêt"", RC[-1],EDATE(RC[-1],RC[1]))"
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub
Merci par avance
Amicalement
Mango19