Sub Traiter_Feuille()
Application.ScreenUpdating = False
supprimer
ranger
End Sub
Private Sub supprimer()
Dim derniereLigne&, i&, vArr, F As Worksheet: Set F = Sheets("TEST")
derniereLigne = F.Range("A" & Rows.Count).End(xlUp).Row
For i = derniereLigne To 1 Step -1
If VBA.Trim(F.Cells(i, 1)) Like "NS" Then
vArr = F.Cells(i, 1).Offset(1).Resize(18).Value2
F.Cells(i, "C").Resize(, 18).Value = Application.Transpose(vArr)
End If
Next
F.Columns("A:B").Delete
F.Rows("1:3").EntireRow.Delete
End Sub
Private Sub ranger()
Sheets("RESULTAT").Range("T2").FormulaR1C1 = "='TEST'!RC[-19]<>"""""
Sheets("TEST").Columns("A:R").AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:=Sheets("RESULTAT").Range("T1:T2"), _
CopyToRange:=Sheets("RESULTAT").Range("A1")
End Sub