Option
Explicit
Sub
Auswertung()
Application.ScreenUpdating =
False
Dim
p
As
Integer
Dim
st
As
Integer
Dim
s
As
Integer
Dim
e
As
Integer
Dim
w
As
Integer
Dim
Beginn
As
Date
Dim
Ende
As
Date
Dim
a
As
Integer
Dim
i
As
Integer
Dim
v
As
Integer
Worksheets(
"Industrie"
).Activate
p = 4
st = 1
s = 9
e = 11
w = 3
Beginn = InputBox(
"Beginn Auswertungszeitraum"
)
Ende = InputBox(
"Ende Auswertungszeitraum"
)
a = 0
For
i = p
To
Cells(Rows.Count, st).
End
(xlUp).Row
If
Cells(i, s) >= Beginn
And
Cells(i, e) <= Ende
Then
v = WorksheetFunction.Sum(Cells(i, w))
a = a + w
End
If
Next
MsgBox a
Application.ScreenUpdating =
True
End
Sub