Sub
test()
Dim
c
As
Range
Dim
firstAddress
As
String
Dim
dblErgebnis
As
Double
With
Worksheets(
"andere Tabelle"
)
Set
c = .Columns(1).Find(Range(
"U2"
).Value, LookIn:=xlValues, lookat:=xlWhole)
If
Not
c
Is
Nothing
Then
firstAddress = c.Address
Do
If
IsNumeric(.Cells(c.Row,
"N"
).Value)
Then
If
.Cells(c.Row,
"K"
).Value =
"Auto"
Then
dblErgebnis = dblErgebnis + .Cells(c.Row,
"N"
).Value
End
If
End
If
Set
c = .Columns(1).FindNext(c)
Loop
While
Not
c
Is
Nothing
And
c.Address <> firstAddress
End
If
End
With
Range(
"A4"
).Value = dblErgebnis
End
Sub