Martin_H
Board Regular
- Joined
- Aug 26, 2020
- Messages
- 190
- Office Version
- 365
- Platform
- Windows
Hello,
I used this code (see below) to delete the entire row if the cell in the column contains the value "GL".
Code itself works well.
Would it be possible to add the OR operator to this code so I can add more values than just "GL"?
I want to add 2 more values.
Thank you very much!
I used this code (see below) to delete the entire row if the cell in the column contains the value "GL".
Code itself works well.
Would it be possible to add the OR operator to this code so I can add more values than just "GL"?
I want to add 2 more values.
Thank you very much!
VBA Code:
Sub MA_GL()
Dim Rng As Range
Set Rng = ActiveSheet.UsedRange
For i = Rng.Cells.count To 1 Step -1
If Rng.Item(i).Value = "GL" Then
Rng.Item(i).EntireRow.DELETE
End If
Next i
End Sub