Sub SupprAjoutLigArchives()
'
Dim MaDate As Long, MaLigne As Long, NbLigne As Long
With Sheets("Archives2")
MaDate = DateAdd("yyyy", -1, Date)
MaLigne = Application.Match(MaDate, .Range("a:a"), 0)
NbLigne = MaLigne - 1
If Not IsError(MaLigne) And NbLigne > 0 Then .Range("a2").Resize(, NbLigne).EntireRow.Delete Shift:=xlToLeft
MaDate = DateAdd("m", 6, Date)
MaLigne = .Range("a2").End(xlDown).Row
NbLigne = MaDate - .Cells(MaLigne, 1).Value
If NbLigne > 0 Then
With .Cells(MaLigne + 1, 1).Resize(NbLigne)
.Value = MaDate
End With
End If
End With
End Sub