Option
Explicit
Sub
test()
Dim
strSuchwert
As
String
Dim
strZielWert
As
String
Dim
lngZielZeile
As
Long
Dim
lngLetzteZeile
As
Long
Dim
lngLaufZahl
As
Long
Dim
lngZeileAdd
As
Long
lngZeileAdd = 0
Application.ScreenUpdating =
False
Application.EnableEvents =
False
With
ThisWorkbook
strSuchwert = .Sheets(
"Auswertung"
).Range(
"D2"
)
lngZielZeile = 10
.Sheets(
"Auswertung"
).
Select
.Sheets(
"Auswertung"
).Range(
"A10:CZ1000"
).Delete
.Sheets(
"Auswertung"
).
Select
lngLetzteZeile = .Sheets(
"Archiv"
).Cells(Rows.Count, 1).
End
(xlUp).Row
For
lngLaufZahl = 1
To
lngLetzteZeile
strZielWert = Worksheets(
"Archiv"
).Cells(lngLaufZahl, 27)
If
strZielWert = strSuchwert
Then
.Sheets(
"Archiv"
).Cells(lngLaufZahl, 1).EntireRow.Copy .Sheets(
"Auswertung"
).Cells(10 + lngZeileAdd, 1)
lngZeileAdd = lngZeileAdd + 1
End
If
Next
lngLaufZahl
End
With
Application.ScreenUpdating =
True
Application.EnableEvents =
True
End
Sub