Sub SuppressionAvecFiltreAvancé()
Dim t, P As Range, a$
t = Timer
Set P = ActiveSheet.UsedRange
Application.ScreenUpdating = False
a = P.Rows(2).Address(0, 0)
P(2, P.Columns.Count + 1) = "=SUMPRODUCT(N(" & a & "<>""""))=0"
P.AdvancedFilter xlFilterInPlace, P(1, P.Columns.Count + 1).Resize(2)
P.Offset(1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
P.AdvancedFilter xlFilterInPlace, ""
P(2, P.Columns.Count + 1) = ""
Set P = ActiveSheet.UsedRange 'MAJ des barres de défilement
MsgBox "Durée " & Format(Timer - t, "0.00 \s")
End Sub
Sub SuppressionAvecTri()
Dim t, P As Range
t = Timer
Set P = ActiveSheet.UsedRange
Application.ScreenUpdating = False
With P.Columns(P.Columns.Count + 1)
.FormulaR1C1 = "=1/SUMPRODUCT(N(RC1:RC[-1]<>""""))"
.Value = .Value
Union(P, .Cells).Sort .Cells, xlAscending 'tri pour accélérer
On Error Resume Next
.SpecialCells(xlCellTypeConstants, 16).EntireRow.Delete
.Value = ""
End With
Set P = ActiveSheet.UsedRange 'MAJ des barres de défilement
MsgBox "Durée " & Format(Timer - t, "0.00 \s")
End Sub