Sub NettoyageRapide()
Dim nlig&, t, rest(), j%, n&, i&, dercel As Range
With ActiveSheet.UsedRange
nlig = .Rows.Count
t = .Resize(nlig + 1) 'matrice, plus rapide
ReDim rest(1 To nlig, 1 To UBound(t, 2))
For j = 1 To UBound(t, 2)
n = 0
For i = 1 To nlig
If t(i, j) <> "" Then n = n + 1: rest(n, j) = t(i, j)
Next
Next
.Value = rest
Set dercel = .Find("*", , xlValues, , xlByRows, xlPrevious)
End With
If Not dercel Is Nothing Then _
Rows(dercel.Row + 1 & ":" & Rows.Count).Delete 'pour supprimer les bordures
With ActiveSheet.UsedRange: End With 'repositionne la barre de défilement verticale
End Sub