Similar Posts

Subscribe
Notify of
6 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Krabat693
9 months ago

This does not work with a formula, so you would have to program a macro which looks line-by-line what is in column C and then delete the line if necessary.

could look like this:

Sub DeleteRows()
   Dim ws As Worksheet
   Dim lastRow As Long
   Dim i As Long

   Set ws = ThisWorkbook.Sheets("Tabelle1") ' Ändere "Tabelle1" auf den Namen deines Blattes

   ' Letzte zeile mit inhalt in Spalte C finden
   lastRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row

   ' Schleife von der Letzten zeile bis zum anfang
   For i = lastRow To 1 Step -1
       ' Check ob "Ergebnis"
       If ws.Cells(i, 3).Value <> "Ergebnis" Then
           ' Spalte löschen wenn ungleich "Ergebnis"
           ws.Rows(i).Delete
       End If
   Next i
End Sub
Krabat693
9 months ago
Reply to  Ulli0707

Change:

Strings:

If ws.Cells(i, 3).Value <> "Ergebnis" Then

Sit for it:

If InStr(1, ws.Cells(i, 3).Value, "Ergebnis", vbTextCompare) = 0 Then
JayRaa
9 months ago

Would only work with macro. The code has already been posted.

Alternatively, you could use “Search/Replace” (available under control +f) and then after searching what should be deleted and then replaced by “.

eterneladam
9 months ago

You could make a filter, then filter all that does not contain “result”, then mark and delete these lines.