Private Sub Worksheet_Activate()
Dim ligdeb&, lig&, w As Worksheet, n&
ligdeb = 5
lig = ligdeb
Application.ScreenUpdating = False
Rows(lig & ":" & Rows.Count).Delete 'RAZ
For Each w In Worksheets
If IsDate("1 " & w.Name) Then
n = Application.CountIf(w.Columns(6), "NON")
If n Then
With w.Range("A3:H" & w.Cells.SpecialCells(xlCellTypeLastCell).Row)
.AutoFilter 6, "NON" 'filtre automatique
.Copy Cells(lig, 1)
.AutoFilter 'ôte le filtre
End With
lig = lig + n + 1
End If
End If
Next
With Range("A" & ligdeb & ":H" & lig - 1)
If .Row = ligdeb Then .Borders.Weight = xlThin
.RemoveDuplicates Array(1, 2, 3, 4, 5, 6, 7, 8), Header:=xlNo 'supprime les lignes doublons
.Resize(, 5).Columns.AutoFit 'ajustemen largeurs colonnes A à E
End With
End Sub