offset ersetzen
09.02.2003 17:01:22
Jens
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
iRow = ActiveCell.Row
If Target.Column <> 3 And _
Target.Column <> 4 Then Exit Sub
If IsEmpty(Target) Then Exit Sub
On Error GoTo ERRORHANDLER
Application.EnableEvents = False
Target.offset(0,8).FormulaArray = "=C" & iRow & "*(Product(if((E" & iRow & ":G" & iRow & ">0),E" & iRow & ":G" & iRow & ")))"
Target.offset(0,9).FormulaArray = "=D" & iRow & "*(Product(if((E" & iRow & ":G" & iRow & ">0),E" & iRow & ":G" & iRow & ")))"
Application.CutCopyMode = False
ERRORHANDLER:
Application.EnableEvents = True
End Sub