With Sheets("planning")
imax = .Cells(Rows.Count, 1).End(xlUp).Row 'numéro de la dernière ligne saisie
For i = imax To 3 Step -1 'boucle en partant du bas
c = CDate(.Cells(i, 5)) 'date de la ligne en cours
'Pour supprimer les cellules
If c + 8 < Now Then
With .Range(.Cells(i, 1), .Cells(i, 7))
.ClearContents
.Interior.ColorIndex = 36
End With
End If
Next i
.Range("A3:G" & .Cells(Rows.Count, 2).End(xlUp).Row).Sort Key1:=.Range("C3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With