Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo fin
If Not Intersect(Target, Range('A7:A1500')) Is Nothing Then
If Target = '' Then
Target.Offset(0, 1).ClearContents 'effacer la formule
Else
ActiveCell.Offset(-1, 1).Formula = '=MONTH(RC[-1])' 'y mettre la formule
End If
End If
fin:
Selection.Offset(0, 1).ClearContents
End Sub