Sub
counter_anders()
Dim
LastRow
As
Long
Dim
Zle
As
Long
Dim
Count_OK
As
Long
Dim
bool
As
Boolean
Dim
dicRow
As
Object
Dim
countBauteil
As
Long
Set
dicRow = CreateObject(
"Scripting.Dictionary"
)
Dim
data(1
To
100000, 1
To
3)
As
Variant
countBauteil = 0
LastRow = Range(
"C65536"
).
End
(xlUp).Row
For
Zle = 1
To
LastRow
If
Range(
"B"
& Zle).Value
Like
"Anlage*"
Then
If
Not
dicRow.Exists(Cells(Zle, 3).Text)
Then
countBauteil = countBauteil + 1
dicRow.Add Cells(Zle, 3).Text, countBauteil
End
If
If
data(dicRow(Cells(Zle, 3).Text), 2) <
CDate
(Cells(Zle, 1))
Then
data(dicRow(Cells(Zle, 3).Text), 1) = Cells(Zle, 3)
data(dicRow(Cells(Zle, 3).Text), 2) =
CDate
(Cells(Zle, 1))
data(dicRow(Cells(Zle, 3).Text), 3) = Cells(Zle, 4)
End
If
End
If
Next
Range(
"K1"
).Resize(countBauteil, 3).Value = data
End
Sub