ich benötige mal eure Hilfe.
Ich mochte die Formel in Spalte E über VBA einbauen und weis nicht wie das funktioniert kann mir jemand mal ein Beislpiel machen!?
https:\/\/www.herber.de/bbs/user/137400.xlsx
Sub Formel_eintragen()
Dim Bereich As Range
Set Bereich = Range("E3:E" & Cells(Rows.Count, 1).End(xlUp).Row)
If Application.CountBlank(Bereich) Then
Bereich.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=IF(ISNUMBER(RC[-3]),SUMIF(C[-1],(RC[- _
4]&""-""&RC[-3]),C),IF(ISNUMBER(RC[-4]),SUMIF(C[-1],(RC[-4]),C)))"
End If
End Sub