Gruppe
Allgemein
Problem
Alle Zeilen, in denen ein "WES" vorkommt, sollen in das Blatt "Target" kopiert werden.
StandardModule: Modul1
Sub TestCopy()
Dim wks As Worksheet
Dim iRow As Integer, iRowL As Integer, iRowT As Integer
Set wks = Worksheets("Target")
iRowL = Cells(Rows.Count, 1).End(xlUp).Row
For iRow = 1 To iRowL
If InStr(Cells(iRow, 9).Value, "WES") Then
iRowT = wks.Cells(Rows.Count, 1).End(xlUp).Row + 1
Rows(iRow).Copy wks.Rows(iRowT)
End If
Next iRow
wks.Columns.AutoFit
Application.CutCopyMode = False
End Sub