So:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim R&, C&, rng As Range, sumCell As Range
With Target
R = .Row
C = .Column
Set sumCell = Cells(R, 11)
If R > 50 Or .Value = "" Then
sumCell = ""
Application.EnableEvents = True
Exit Sub
End If
Select Case C
Case Is > 8, Is < 4: Exit Sub
End Select
Set rng = Range(Cells(R, 4), Cells(R, 8))
rng.ClearContents
If .Value <> "x" Then .Value = "x"
sumCell = (8 - C) * Cells(R, 3) 'Summe
End With
Application.EnableEvents = True
End Sub
Das es ab Zeile 5 nicht mehr geht liegt sehr wahrscheinlich an deiner Tabelle, guck mal was da in Spalte 3 steht (Multiplikator) und was ab Zeile 5 anders ist... mein Code ist definitiv in der lage auch darüber hinaus zu funktionieren.
|