Sub Traiter_Feuille()
Application.ScreenUpdating = False
supprimer
ranger
Cells(1).CurrentRegion.Columns.AutoFit
End Sub
Private Sub supprimer()
Dim derniereLigne&, i&, j&, vArr
derniereLigne = Range("A" & Rows.Count).End(xlUp).Row
j = 1
For i = derniereLigne To 1 Step -1
If VBA.Trim(Cells(i, 1)) Like "NS" Then
vArr = Cells(i, 1).Offset(1).Resize(15).Value2
Cells(j, "C").Resize(, 15).Value = Application.Transpose(vArr)
End If
j = j + 1
Next
End Sub
Private Sub ranger()
Columns("A:B").Delete
With ActiveSheet.UsedRange
.Sort .Columns(1), xlAscending, Header:=xlNo 'tri sur 3 colonnes
End With
Rows("1:16").EntireRow.Delete
End Sub