Private Sub Worksheet_Activate()
Dim ncol%, tablo, i&, x$, y$, n&, j%
ncol = 11 'nombre de colonnes du tableau source, à adapter
tablo = Feuil1.[A1].CurrentRegion.Resize(, ncol) 'matrice, plus rapide
ReDim resu(1 To UBound(tablo), 1 To 7)
For i = 2 To UBound(tablo)
x = CStr(tablo(i, 9)): y = CStr(tablo(i, 10))
If IsNumeric(x) And IsNumeric(y) Then
If CDbl(x) <= CDbl(y) Then
n = n + 1
For j = 1 To 6: resu(n, j) = tablo(i, j): Next j
resu(n, 7) = tablo(i, ncol)
End If
End If
Next i
'---restitution---
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [A3] '1ère cellule de destination
If n Then .Resize(n, 7) = resu
.Offset(n).Resize(Rows.Count - n - .Row + 1, 7).ClearContents 'RAZ en dessous
End With
Columns.AutoFit 'ajuste les largeurs
With UsedRange: End With 'actualise la barre de défilement verticale
End Sub