Sub SupprAjoutColArchives()
'
Dim MaDate As Long, MaColonne As Long, NbColonnes As Long
With Sheets("Archives")
MaDate = DateAdd("yyyy", -1, Date)
MaColonne = Application.Match(MaDate, .Range("2:2"), 0)
NbColonnes = MaColonne - 4
If Not IsError(MaColonne) And NbColonnes > 0 Then .Range("D2").Resize(, NbColonnes).EntireColumn.Delete Shift:=xlToLeft
MaDate = DateAdd("m", 6, Date)
MaColonne = .Range("B2").End(xlToRight).Column
NbColonnes = MaDate - .Cells(2, MaColonne).Value
If NbColonnes > 0 Then
With .Cells(2, MaColonne + 1).Resize(, NbColonnes)
.FormulaR1C1 = "=RC[-1]+1"
.Value = .Value
End With
End If
End With
End Sub