Sub SansDico()
Dim derlig&, Source As Worksheet, wks As Object, nada, ok As Boolean, t, x, i&, ref, deb
deb = Timer
Set Source = ActiveSheet
Application.ScreenUpdating = False
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData
derlig = Cells(Rows.Count, "a").End(xlUp).Row
Range("a1").Resize(derlig, 2).Interior.ColorIndex = xlColorIndexNone
t = Range("a1").Resize(derlig, 2)
For i = 1 To derlig: t(i, 2) = i: Next
On Error Resume Next
Set wks = ThisWorkbook.Worksheets.Add
If wks Is Nothing Then MsgBox "Erreur création feuille tempo => échec et fin!": Exit Sub
On Error GoTo Fin
With wks
.Range("a1").Resize(derlig, 2) = t
.Range("a1").Resize(derlig, 2).Sort key1:=.Columns(1), Header:=xlNo
t = .Range("a1").Resize(derlig, 2)
For i = 2 To derlig
If t(i, 1) = t(i - 1, 1) Then Source.Cells(t(i, 2), 1).Interior.Color = RGB(160, 241, 254)
Next i
End With
Application.DisplayAlerts = False: wks.Delete: Application.DisplayAlerts = True
Source.Cells(Rows.Count, "d").End(xlUp).Offset(1) = Format(Timer - deb, "0.00\ sec.")
Exit Sub
Fin:
Application.DisplayAlerts = False: wks.Delete: Application.DisplayAlerts = True
MsgBox "Erreur au sein de la macro => Echec!"
End Sub