i have written code to delete rows containing "Mersand" in Col A from row 2 onwards
I need this amended to delete the row above "Mersand" as well
it would be appreciated if someone would kindly amend my code
I need this amended to delete the row above "Mersand" as well
it would be appreciated if someone would kindly amend my code
Code:
Sub Del_Mersand()
With Sheets("Imported Data")
Dim LR As Long, i As Long
LR = .Range("A" & .Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
If .Range("A" & i).Value Like "*Mersand*" Then Range("A" & i).EntireRow.Delete
Next i
End With
End Sub