For
i = 1
To
lastRow
On
Error
Resume
Next
If
Not
IsError(Application.Match(i, verwendeteZeilen, 0))
Then
On
Error
GoTo
0
Dim
Zellenwert
As
Variant
Zellenwert = ws.Cells(i, 1).Value
If
Not
IsNumeric(Zellenwert)
And
(Zellenwert
Like
"*RL_*"
Or
Zellenwert
Like
"*RT*"
Or
Zellenwert
Like
"*BG*"
)
Then
currentBox = Zellenwert
startRow = i
For
j = startRow + 1
To
lastRow
If
ws.Cells(j, 1).Value = currentBox
Then
endRow = j
Paare.Add Array(currentBox, startRow, endRow, 1, Paare.Count + 1, 1)
verwendeteZeilen.Add startRow
verwendeteZeilen.Add endRow
Exit
For
End
If
Next
j
End
If
End
If
Next
i