Private
Sub
Worksheet_Calculate()
Dim
i
As
Long
, zeile
As
Long
zeile = 0
For
i = 0
To
UBound(arrG)
zeile = i + 1
If
arrG(i) <> Cells(zeile, 13)
Then
If
Cells(zeile, 10) = arrG(i)
Then
arrG(i) = Cells(zeile, 13)
Cells(zeile, 10) = Cells(zeile, 13)
Else
arrG(i) = Cells(zeile, 13)
End
If
End
If
Next
End
Sub
Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
rC
As
Range
Application.EnableEvents =
False
If
Not
Intersect(Target, Range(
"M:M"
))
Is
Nothing
Then
For
Each
rC
In
Target
If
rC.Column = 13
Then
If
rC.Offset(0, -3) =
""
Then
rC.Offset(0, -3) = rC
End
If
Next
rC
End
If
If
Not
Intersect(Target, Range(
"J:J"
))
Is
Nothing
Then
For
Each
rC
In
Target
If
rC.Column = 10
Then
If
rC =
""
Then
rC = rC.Offset(0, 3)
End
If
Next
rC
End
If
Application.EnableEvents =
True
End
Sub