Erkläre das mal genauer.
Public
Sub
CopyRows()
Dim
lRow
As
Long
Dim
x
As
Long
Application.ScreenUpdating =
False
With
Worksheets(
"Customer sheet"
)
lRow = .Cells(.Rows.Count, 3).
End
(xlUp).Row
If
lRow > 1
Then
lRow = lRow + 1
End
With
With
Worksheets(
"Contact agent list"
)
For
x = 2
To
.Cells(.Rows.Count, 1).
End
(xlUp).Row
If
.Cells(x, 1).Value =
"x"
Then
.Cells(x, 1).Value = lRow
.Cells(x, 3).Resize(1, 9).Copy Worksheets(
"Customer sheet"
).Cells(lRow, 3)
lRow = lRow + 1
End
If
Next
x
End
With
Application.CutCopyMode =
False
Application.ScreenUpdating =
True
MsgBox
"Fertig"
End
Sub