I have found this code that searches a workbook for a cell containing contents. The only problem is that if it doesn't find the value, an error message pops up. How can I bypass this and end the macro with either a user form or no error at all?
Code:
Sub DeleteRows()
Application.ScreenUpdating = False
With Range("R5:R20004")
.Replace "QLD", True, xlWhole
.SpecialCells(xlCellTypeConstants, 4).EntireRow.Delete
End With
Application.ScreenUpdating = True
End Sub