Sub SupprimerColonnes()
If MsgBox("Attention vous allez supprimer des colonnes dont la date de fin est antérieure à 60 jours...", 49) = 2 Then Exit Sub
Dim derlig&
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
On Error Resume Next 's'il n'y a aucune colonne à supprimer
[1:1].Insert 'ligne auxiliaire
With Intersect([O1].Resize(, Columns.Count - 14), ActiveSheet.UsedRange.EntireColumn)
derlig = .EntireColumn.Find("*", , xlFormulas, , xlByRows, xlPrevious).Row
.FormulaR1C1 = "=LN(R3C>=TODAY()-60)"
.Value = .Value 'suppression des formules
.EntireColumn.Sort Rows(1), xlAscending, Orientation:=xlLeftToRight
Intersect(.SpecialCells(xlCellTypeConstants, 16).EntireColumn, Rows("1:" & derlig)).Delete xlToLeft
.EntireColumn.AutoFit 'ajustement automatique
End With
[1:1].Delete 'suppression de la ligne auxiliaire
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub