Hallo,
habe 2 ineinandergreifende Schleifen. Leider wirft er mit jedes mal "Next ohne for" raus, hab schon überall ein End if hinzugefügt, aber leider klappt das nirgends.
Dim q As Long
Dim w As Long
For w = 1 To 6
For q = 1 To 100
If Sheets("Tabelle1").Cells(w, q) Like "*grd*" Or _
Sheets("Tabelle1").Cells(w, q) Like "*%*" Then
Worksheets("Tabelle1").Rows(w).Copy Destination:=Worksheets("Tabelle2").Rows(6)
End If
If Sheets("Tabelle1").Cells(w, q) Like "*grd*" Or _
Sheets("Tabelle1").Cells(w, q) Like "*%*" Then Exit For
Next q
If q = 100 Then Next w
End If
|