Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Set
myrange = Range(
"B1:K1000"
)
Dim
R
As
Integer
R = ActiveCell.Row
If
myrange.Cells(R, 1) <>
""
And
myrange.Cells(R, 5) =
""
Then
myrange.Cells(R, 5).Value =
CDate
(Format(Now,
"dd.mm.yy hh:mm"
))
If
myrange.Cells(R, 1) =
"A"
And
myrange.Cells(R, 4) =
""
Then
myrange.Cells(R, 4).Value =
"offen"
If
myrange.Cells(R - 1, 1) <>
""
And
myrange.Cells(R - 1, 5) =
""
Then
myrange.Cells(R - 1, 5).Value =
CDate
(Format(Now,
"dd.mm.yy hh:mm"
))
If
myrange.Cells(R - 1, 1) =
"A"
And
myrange.Cells(R - 1, 4) =
""
Then
myrange.Cells(R - 1, 4).Value =
"offen"
If
myrange.Cells(R, 4) =
"ok"
Then
myrange.Cells(R, 10).Value = 1
If
myrange.Cells(R - 1, 4) =
"ok"
Then
myrange.Cells(R - 1, 10).Value = 1
End
Sub