HI All
in need some help in refining some code. I am trying to delete rows based on a value of a cell in column A.
the problem i have is that sometime the value entered is slightly different so the code stops working. The problem i have is that sometimes the data does not have the brackets.
ESL Bioscience (NZ) Ltd
WPMP Services (Ray Percival)
become
ESL Bioscience NZ Ltd
WPMP Services Ray Percival
This is what i have so far
in need some help in refining some code. I am trying to delete rows based on a value of a cell in column A.
the problem i have is that sometime the value entered is slightly different so the code stops working. The problem i have is that sometimes the data does not have the brackets.
ESL Bioscience (NZ) Ltd
WPMP Services (Ray Percival)
become
ESL Bioscience NZ Ltd
WPMP Services Ray Percival
This is what i have so far
Code:
Sub Delete_ESL_WPMP()
'loop thriugh data to remove ESL Bioscience (NZ) Ltd and WPMP Services (Ray Percival)
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = FinalRow To 2 Step -1
If Cells(i, 1).Value = "WPMP Services (Ray Percival)" Then
Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ESL*" Then
Cells(i, 1).EntireRow.Delete
End If
End If
Next i
End Sub