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
Dim
b
As
Integer
p = 4
st = 1
s = 9
e = 11
w = 3
ThisWorkbook.Worksheets(
"Industrie"
).Activate
Beginn = InputBox(
"Bitte Beginn des Auswertungszeitraumes eingeben im Datumsformat TT.MM.JJJJ:"
)
Ende = InputBox(
"Bitte Ende des Auswertungszeitraumes eingeben im Datumsformat TT.MM.JJJJ:"
)
Dim
Status
Status = InputBox(
"Bitte Projektstatus eingeben und auf Groß- und Kleinschreibung achten:"
)
a = 0
For
i = p
To
Cells(Rows.Count, st).
End
(xlUp).Row
If
Cells(i, s) >= Beginn
And
Cells(i, e) <= Ende
And
Cells(i, st) = Status
Then
v = v + Cells(i, w).Value
a = a + 1
End
If
Next
Worksheets(
"Industrie Auswertung"
).Range(
"C5"
).Value = Status
Worksheets(
"Industrie Auswertung"
).Range(
"D5"
).Value = a
Worksheets(
"Industrie Auswertung"
).Range(
"E5"
).Value = v
ThisWorkbook.Worksheets(
"Industrie Auswertung"
).Activate
Cells(1, 1).
Select
Application.ScreenUpdating =
True
End
Sub