Private
Sub
Workbook_SheetCalculate(
ByVal
Sh
As
Object
)
If
Sh.Name =
"Rechnung"
Or
Sh.Name =
"Ergebniss"
Then
Exit
Sub
Application.EnableEvents =
False
Dim
i
As
Double
, zeile
As
Double
zeile = 0
For
i = 0
To
UBound(arrG)
zeile = i + 1
If
arrG(i) <> Sh.Cells(zeile, 13)
Then
If
Sh.Cells(zeile, 10) = arrG(i)
Then
arrG(i) = Sh.Cells(zeile, 13)
Sh.Cells(zeile, 10) = Sh.Cells(zeile, 13)
Else
arrG(i) = Sh.Cells(zeile, 13)
End
If
End
If
Next
Application.EnableEvents =
True
End
Sub