Vishaal
Well-known Member
- Joined
- Mar 16, 2019
- Messages
- 533
- Office Version
- 2010
- 2007
- Platform
- Windows
- Web
Hi,
we have a code for delete entire row if one condition meet, VBA is
Now we want to add more words, how can we do that, in the above code we have added "GS" but we have more words, approx 108 words
we required, if any word find in that column, entire row delete
we have a code for delete entire row if one condition meet, VBA is
VBA Code:
Sub Macro4()
'
Dim LR As Long, i As Long
LR = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
For i = LR To 1 Step -1
If LCase(Range("Q" & i).Value) = "GS" Then Rows(i).Delete
Next i
End Sub
Now we want to add more words, how can we do that, in the above code we have added "GS" but we have more words, approx 108 words
we required, if any word find in that column, entire row delete