Ik zou graag deze code willen vereenvoudigen.
Als in kolom E de tekst "FR" of "FR1" of "FR2",
dan delete rij.
Ik heb 'm nu in drieeen gesplitst, maar moet eenvoudiger kunnen?
Als in kolom E de tekst "FR" of "FR1" of "FR2",
dan delete rij.
Ik heb 'm nu in drieeen gesplitst, maar moet eenvoudiger kunnen?
Code:
Sub RowKillerFR()
Dim col As String, N As Long, i As Long
col = "E"
N = Cells(Rows.Count, col).End(xlUp).Row
For i = N To 2 Step -1
If Cells(i, col).Value = "FR" Then
Cells(i, col).EntireRow.Delete
End If
Next i
Dim col1 As String, N1 As Long, i1 As Long
col1 = "E"
N1 = Cells(Rows.Count, col1).End(xlUp).Row
For i1 = N1 To 2 Step -1
If Cells(i1, col1).Value = "FR1" Then
Cells(i1, col1).EntireRow.Delete
End If
Next i1
Dim col2 As String, N2 As Long, i2 As Long
col2 = "E"
N2 = Cells(Rows.Count, col2).End(xlUp).Row
For i2 = N2 To 2 Step -1
If Cells(i2, col2).Value = "FR2" Then
Cells(i2, col2).EntireRow.Delete
End If
Next i2
End Sub