This probably isnt the the most appropriate solution to begin with but it gets the job done, almost.
Thing is, "BufferBelow" works as intended while "BufferAbove" leads excel into a crash.
What s the big difference? i dont understand ~
Thing is, "BufferBelow" works as intended while "BufferAbove" leads excel into a crash.
What s the big difference? i dont understand ~
VBA Code:
Sub BufferBelow()
Application.ScreenUpdating = False
With ActiveSheet
Dim vRb As Range
For Each vRb In Range("A1", Range("A" & Rows.Count).End(xlUp))
Select Case vRb.Value
Case "Aufwand", "Ertrag"
vRb.Offset(0, 1).EntireRow.Insert
End Select
Next vRb
End With
Application.ScreenUpdating = True
End Sub
Sub BufferAbove()
Application.ScreenUpdating = False
With ActiveSheet
Dim vRa As Range
For Each vRa In Range("A1", Range("A" & Rows.Count).End(xlUp))
Select Case vRa.Value
Case "Total Aufwand", "Gewinn", "Total Ertrag"
vRa.Offset(0, -1).EntireRow.Insert
End Select
Next vRa
End With
Application.ScreenUpdating = True
End Sub