ich habe folgendes Makro, das mir die ganze Zeile automatisch löscht, falls in Spalte B das Wort closed bzw. stopped steht...Jetzt möchte ich das Gleiche erreichen, allerdings nur dann wenn auch der entsprechende Eintrag in Spalte C mit einem "R" beginnt und nur dann!!...Wie muss ich hier mein Makro erweitern?
Könnt ihr mir hier helfen?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lngRow As Long
If Not Intersect(Target, Columns(2)) Is Nothing Then
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
For lngRow = Cells(Rows.Count, 2).End(xlUp).Row To 1 Step -1
With Cells(lngRow, 2)
If .Value = "closed" Or .Value = "stopped" Then Rows(lngRow).Delete
End With
Next lngRow
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
Application.CalculateFullRebuild
End If
End Sub