selbstverständlich:
Dim
liZeile
As
Long
Dim
liZeileMax
As
Long
Dim
blnInsert
As
Boolean
liZeileMax = Cells(Rows.Count, 1).
End
(xlUp).Row
For
liZeile = 1
To
liZeileMax
If
Range(
"A"
& liZeile).Interior.ColorIndex = 48
Then
If
Range(
"B"
& liZeile).Text =
""
Then
Exit
For
Else
blnInsert =
True
End
If
End
If
Next
If
liZeile > liZeileMax
Then
Call
MsgBox(
"nichts gefunden"
, vbExclamation)
Exit
Sub
End
If
If
blnInsert
Then
Call
Rows(liZeile).Insert(xlShiftDown)
Cells(liZeile,
"B"
).Value =
"TestB"
Cells(liZeile,
"C"
).Value =
"TestC"
Cells(liZeile,
"D"
).Value =
"TestD"
Cells(liZeile,
"E"
).Value =
"TestE"
End
Sub