Spalte L mittels Code füllen

josef24

Erfahrenes Mitglied
Ich möchte die Spalte "L" mittels VBA Code füllen. Die Formel aus dem Code wird aber nicht in die Spalte "L" geschrieben, folglich kann keine Berechnung stattfinden. Was mache ich falsch? Es geht um den CASE 12, bei Case 11 funktioniert der Code noch. Kann mir bitte jemand helfen?

Visual Basic:
                Case 11  ' Änderung in Spalte E ? Formel in Spalte F (E * $B$18)
                    If cell.Row >= 2 And cell.Row <= 13 Then
                        With Me.Cells(cell.Row, "K")
                            .NumberFormat = "General"
                             .FormulaLocal = "=WENN(ISTLEER(L" & cell.Row & ");"""";L" & cell.Row & "*$A$18)"
                        End With
                    End If
                    
                Case 12      ' Änderung in Spalte L ? Formel in Spalte L (Differenz J - Vorgänger)
                    If cell.Row >= 2 And cell.Row <= 13 Then
                        With Me.Cells(cell.Row, "L")
                    .NumberFormat = "General"
                .FormulaLocal = "=WENN(ISTLEER(J" & cell.Row & ");"""";J" & cell.Row & "-J" & (cell.Row - 1) & ")"
            End With
        End If
 
Zurück